三级安全教育修改 考试 未通过继续考试 添加考试 单据

责任状 签订 判断 是否有了 再生成
培训老师 多选   培训形式修改
生成试题 添加公共方法
AOP金能昆仑  数据库名称修改
This commit is contained in:
wyw 2025-12-25 10:40:23 +08:00
parent f2a7c1b881
commit 3a0cc7e335
19 changed files with 412873 additions and 188 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,107 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace APT.Data.Migrations.Migrations
{
public partial class wyw2025121901 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "TEACHER",
table: "T_SE_NEW_USERS");
migrationBuilder.DropColumn(
name: "TRAIN_MODEL",
table: "T_SE_NEW_USERS");
migrationBuilder.AddColumn<int>(
name: "TRAINTYPE",
table: "T_SE_NEW_USERS",
type: "int",
nullable: false,
defaultValue: 0);
migrationBuilder.CreateTable(
name: "T_SE_NEW_USERS_TEACHER",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
NEW_USERS_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_SE_NEW_USERS_TEACHER", x => x.ID);
table.ForeignKey(
name: "FK_T_SE_NEW_USERS_TEACHER_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_SE_NEW_USERS_TEACHER_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_SE_NEW_USERS_TEACHER_T_SE_NEW_USERS_NEW_USERS_ID",
column: x => x.NEW_USERS_ID,
principalTable: "T_SE_NEW_USERS",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_T_SE_NEW_USERS_TEACHER_NEW_USERS_ID",
table: "T_SE_NEW_USERS_TEACHER",
column: "NEW_USERS_ID");
migrationBuilder.CreateIndex(
name: "IX_T_SE_NEW_USERS_TEACHER_ORG_ID",
table: "T_SE_NEW_USERS_TEACHER",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_SE_NEW_USERS_TEACHER_USER_ID",
table: "T_SE_NEW_USERS_TEACHER",
column: "USER_ID");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "T_SE_NEW_USERS_TEACHER");
migrationBuilder.DropColumn(
name: "TRAINTYPE",
table: "T_SE_NEW_USERS");
migrationBuilder.AddColumn<string>(
name: "TEACHER",
table: "T_SE_NEW_USERS",
type: "nvarchar(50)",
maxLength: 50,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "TRAIN_MODEL",
table: "T_SE_NEW_USERS",
type: "nvarchar(50)",
maxLength: 50,
nullable: true);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,31 @@
using Microsoft.EntityFrameworkCore.Migrations;
namespace APT.Data.Migrations.Migrations
{
public partial class wyw2025121902 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>(
name: "TRAINTYPE",
table: "T_SE_NEW_USERS",
type: "int",
nullable: true,
oldClrType: typeof(int),
oldType: "int");
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>(
name: "TRAINTYPE",
table: "T_SE_NEW_USERS",
type: "int",
nullable: false,
defaultValue: 0,
oldClrType: typeof(int),
oldType: "int",
oldNullable: true);
}
}
}

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,108 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace APT.Data.Migrations.Migrations
{
public partial class wyw2025121903 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<Guid>(
name: "TEXT_ID",
table: "T_SE_NEW_USER_DETAIL_PAPER",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.CreateTable(
name: "T_SE_NEW_USER_DETAIL_TEXT",
columns: table => new
{
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
RECORD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
SCORE = table.Column<int>(type: "int", nullable: true),
TEXT_TIMES = table.Column<int>(type: "int", nullable: false),
ISPASS = table.Column<bool>(type: "bit", nullable: false),
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
},
constraints: table =>
{
table.PrimaryKey("PK_T_SE_NEW_USER_DETAIL_TEXT", x => x.ID);
table.ForeignKey(
name: "FK_T_SE_NEW_USER_DETAIL_TEXT_T_FM_ORGANIZATION_ORG_ID",
column: x => x.ORG_ID,
principalTable: "T_FM_ORGANIZATION",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_SE_NEW_USER_DETAIL_TEXT_T_FM_USER_USER_ID",
column: x => x.USER_ID,
principalTable: "T_FM_USER",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
table.ForeignKey(
name: "FK_T_SE_NEW_USER_DETAIL_TEXT_T_SE_NEW_USER_DETAIL_RECORD_ID",
column: x => x.RECORD_ID,
principalTable: "T_SE_NEW_USER_DETAIL",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
});
migrationBuilder.CreateIndex(
name: "IX_T_SE_NEW_USER_DETAIL_PAPER_TEXT_ID",
table: "T_SE_NEW_USER_DETAIL_PAPER",
column: "TEXT_ID");
migrationBuilder.CreateIndex(
name: "IX_T_SE_NEW_USER_DETAIL_TEXT_ORG_ID",
table: "T_SE_NEW_USER_DETAIL_TEXT",
column: "ORG_ID");
migrationBuilder.CreateIndex(
name: "IX_T_SE_NEW_USER_DETAIL_TEXT_RECORD_ID",
table: "T_SE_NEW_USER_DETAIL_TEXT",
column: "RECORD_ID");
migrationBuilder.CreateIndex(
name: "IX_T_SE_NEW_USER_DETAIL_TEXT_USER_ID",
table: "T_SE_NEW_USER_DETAIL_TEXT",
column: "USER_ID");
migrationBuilder.AddForeignKey(
name: "FK_T_SE_NEW_USER_DETAIL_PAPER_T_SE_NEW_USER_DETAIL_TEXT_TEXT_ID",
table: "T_SE_NEW_USER_DETAIL_PAPER",
column: "TEXT_ID",
principalTable: "T_SE_NEW_USER_DETAIL_TEXT",
principalColumn: "ID",
onDelete: ReferentialAction.Restrict);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropForeignKey(
name: "FK_T_SE_NEW_USER_DETAIL_PAPER_T_SE_NEW_USER_DETAIL_TEXT_TEXT_ID",
table: "T_SE_NEW_USER_DETAIL_PAPER");
migrationBuilder.DropTable(
name: "T_SE_NEW_USER_DETAIL_TEXT");
migrationBuilder.DropIndex(
name: "IX_T_SE_NEW_USER_DETAIL_PAPER_TEXT_ID",
table: "T_SE_NEW_USER_DETAIL_PAPER");
migrationBuilder.DropColumn(
name: "TEXT_ID",
table: "T_SE_NEW_USER_DETAIL_PAPER");
}
}
}

View File

@ -72247,17 +72247,12 @@ namespace APT.Data.Migrations.Migrations
.HasMaxLength(100)
.HasColumnType("nvarchar(100)");
b.Property<string>("TEACHER")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("TRAINNING_TIME")
.HasMaxLength(10)
.HasColumnType("nvarchar(10)");
b.Property<string>("TRAIN_MODEL")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<int?>("TRAINTYPE")
.HasColumnType("int");
b.Property<int>("TRAIN_STATUS")
.HasColumnType("int");
@ -72335,6 +72330,63 @@ namespace APT.Data.Migrations.Migrations
b.ToTable("T_SE_NEW_USERS_FILE");
});
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USERS_TEACHER", b =>
{
b.Property<Guid>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("CREATER_ID")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("CREATE_TIME")
.HasColumnType("datetime2");
b.Property<int>("ENTITY_ORG_TPYE")
.HasColumnType("int");
b.Property<Guid?>("FLOW_ID")
.HasColumnType("uniqueidentifier");
b.Property<int>("FLOW_SEND_STATUS")
.HasColumnType("int");
b.Property<int>("FLOW_STATUS")
.HasColumnType("int");
b.Property<Guid?>("FORM_ID")
.HasColumnType("uniqueidentifier");
b.Property<bool>("IS_DELETED")
.HasColumnType("bit");
b.Property<Guid?>("MODIFIER_ID")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("MODIFY_TIME")
.HasColumnType("datetime2");
b.Property<Guid?>("NEW_USERS_ID")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("ORG_ID")
.IsRequired()
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("USER_ID")
.HasColumnType("uniqueidentifier");
b.HasKey("ID");
b.HasIndex("NEW_USERS_ID");
b.HasIndex("ORG_ID");
b.HasIndex("USER_ID");
b.ToTable("T_SE_NEW_USERS_TEACHER");
});
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USER_DETAIL", b =>
{
b.Property<Guid>("ID")
@ -72537,6 +72589,9 @@ namespace APT.Data.Migrations.Migrations
b.Property<Guid?>("TEST_ID")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("TEXT_ID")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("USER_ID")
.HasColumnType("uniqueidentifier");
@ -72548,11 +72603,79 @@ namespace APT.Data.Migrations.Migrations
b.HasIndex("TEST_ID");
b.HasIndex("TEXT_ID");
b.HasIndex("USER_ID");
b.ToTable("T_SE_NEW_USER_DETAIL_PAPER");
});
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USER_DETAIL_TEXT", b =>
{
b.Property<Guid>("ID")
.ValueGeneratedOnAdd()
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("CREATER_ID")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("CREATE_TIME")
.HasColumnType("datetime2");
b.Property<int>("ENTITY_ORG_TPYE")
.HasColumnType("int");
b.Property<Guid?>("FLOW_ID")
.HasColumnType("uniqueidentifier");
b.Property<int>("FLOW_SEND_STATUS")
.HasColumnType("int");
b.Property<int>("FLOW_STATUS")
.HasColumnType("int");
b.Property<Guid?>("FORM_ID")
.HasColumnType("uniqueidentifier");
b.Property<bool>("ISPASS")
.HasColumnType("bit");
b.Property<bool>("IS_DELETED")
.HasColumnType("bit");
b.Property<Guid?>("MODIFIER_ID")
.HasColumnType("uniqueidentifier");
b.Property<DateTime?>("MODIFY_TIME")
.HasColumnType("datetime2");
b.Property<Guid?>("ORG_ID")
.IsRequired()
.HasColumnType("uniqueidentifier");
b.Property<Guid>("RECORD_ID")
.HasColumnType("uniqueidentifier");
b.Property<int?>("SCORE")
.HasColumnType("int");
b.Property<int>("TEXT_TIMES")
.HasColumnType("int");
b.Property<Guid?>("USER_ID")
.HasColumnType("uniqueidentifier");
b.HasKey("ID");
b.HasIndex("ORG_ID");
b.HasIndex("RECORD_ID");
b.HasIndex("USER_ID");
b.ToTable("T_SE_NEW_USER_DETAIL_TEXT");
});
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_RENEWAL_TRAIN", b =>
{
b.Property<Guid>("ID")
@ -123859,6 +123982,31 @@ namespace APT.Data.Migrations.Migrations
b.Navigation("Nav_Org");
});
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USERS_TEACHER", b =>
{
b.HasOne("APT.MS.Domain.Entities.SE.T_SE_NEW_USERS", "Nav_Users")
.WithMany("Nav_Teachers")
.HasForeignKey("NEW_USERS_ID")
.OnDelete(DeleteBehavior.Restrict);
b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
.WithMany()
.HasForeignKey("ORG_ID")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
.WithMany()
.HasForeignKey("USER_ID")
.OnDelete(DeleteBehavior.Restrict);
b.Navigation("Nav_Org");
b.Navigation("Nav_User");
b.Navigation("Nav_Users");
});
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USER_DETAIL", b =>
{
b.HasOne("APT.MS.Domain.Entities.SE.T_SE_NEW_USERS", "Nav_NewUser")
@ -123952,6 +124100,11 @@ namespace APT.Data.Migrations.Migrations
.HasForeignKey("TEST_ID")
.OnDelete(DeleteBehavior.Restrict);
b.HasOne("APT.MS.Domain.Entities.SE.T_SE_NEW_USER_DETAIL_TEXT", "Nav_Text")
.WithMany("Nav_ListPaper")
.HasForeignKey("TEXT_ID")
.OnDelete(DeleteBehavior.Restrict);
b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
.WithMany()
.HasForeignKey("USER_ID")
@ -123963,6 +124116,34 @@ namespace APT.Data.Migrations.Migrations
b.Navigation("Nav_Test");
b.Navigation("Nav_Text");
b.Navigation("Nav_User");
});
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USER_DETAIL_TEXT", b =>
{
b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
.WithMany()
.HasForeignKey("ORG_ID")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("APT.MS.Domain.Entities.SE.T_SE_NEW_USER_DETAIL", "Nav_Record")
.WithMany()
.HasForeignKey("RECORD_ID")
.OnDelete(DeleteBehavior.Restrict)
.IsRequired();
b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
.WithMany()
.HasForeignKey("USER_ID")
.OnDelete(DeleteBehavior.Restrict);
b.Navigation("Nav_Org");
b.Navigation("Nav_Record");
b.Navigation("Nav_User");
});
@ -136158,6 +136339,8 @@ namespace APT.Data.Migrations.Migrations
b.Navigation("Nav_Files");
b.Navigation("Nav_NewUserDetail");
b.Navigation("Nav_Teachers");
});
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USER_DETAIL", b =>
@ -136167,6 +136350,11 @@ namespace APT.Data.Migrations.Migrations
b.Navigation("Nav_Papers");
});
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_NEW_USER_DETAIL_TEXT", b =>
{
b.Navigation("Nav_ListPaper");
});
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_RENEWAL_TRAIN", b =>
{
b.Navigation("Nav_Files");

View File

@ -10247,8 +10247,6 @@ builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).
base.Configure(builder);
builder.Property(t => t.TAINNING_ADDR).HasMaxLength(100);
builder.Property(t => t.TRAINNING_TIME).HasMaxLength(10);
builder.Property(t => t.TEACHER).HasMaxLength(50);
builder.Property(t => t.TRAIN_MODEL).HasMaxLength(50);
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
builder.HasOne(t => t.Nav_Content).WithMany().HasForeignKey(t => t.CONTENT_ID).OnDelete(DeleteBehavior.Restrict);
@ -10305,6 +10303,7 @@ builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).
{
base.Configure(builder);
builder.HasOne(t => t.Nav_Record).WithMany(t=>t.Nav_Papers).HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
builder.HasOne(t => t.Nav_Text).WithMany(t=>t.Nav_ListPaper).HasForeignKey(t => t.TEXT_ID).OnDelete(DeleteBehavior.Restrict);
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
builder.HasOne(t => t.Nav_Test).WithMany().HasForeignKey(t => t.TEST_ID).OnDelete(DeleteBehavior.Restrict);
}
@ -10793,6 +10792,28 @@ builder.HasIndex("NAME").IsUnique();
{
base.Configure(builder);
}
}
#endregion
#region NewUsersTeacher
public partial class SENewUsersTeacherMap :APTEntityBaseMap<T_SE_NEW_USERS_TEACHER>
{
public override void Configure(EntityTypeBuilder<T_SE_NEW_USERS_TEACHER> builder)
{
base.Configure(builder);
builder.HasOne(t => t.Nav_Users).WithMany(t=>t.Nav_Teachers).HasForeignKey(t => t.NEW_USERS_ID).OnDelete(DeleteBehavior.Restrict);
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
}
}
#endregion
#region NewUserDetailText
public partial class SENewUserDetailTextMap :APTEntityBaseMap<T_SE_NEW_USER_DETAIL_TEXT>
{
public override void Configure(EntityTypeBuilder<T_SE_NEW_USER_DETAIL_TEXT> builder)
{
base.Configure(builder);
builder.HasOne(t => t.Nav_Record).WithMany().HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
}
}
#endregion
#region RenewalTrain

View File

@ -48,23 +48,7 @@ namespace APT.MS.Domain.Entities.SE
[FormFieldEdit]
[DataFieldLength(10)]
public string? TRAINNING_TIME { get; set; }
/// <summary>
/// 培训老师
/// </summary>
[Description("培训老师")]
[FormFieldTable]
[FormFieldQuery]
[FormFieldEdit]
[DataFieldLength(50)]
public string TEACHER { get; set; }
/// <summary>
/// 培训形式
/// </summary>
[Description("培训形式")]
[EnumName("TRAINMODELENUM")]
[DataFieldLength(50)]
[FormFieldEdit]
public string TRAIN_MODEL { get; set; }
/// <summary>
/// 组织部门
/// </summary>
@ -147,5 +131,19 @@ namespace APT.MS.Domain.Entities.SE
[EnumName("SETrainNeedSuvey")]
[FormFieldQuery]
public SETrainNeedSuvey IS_CREATETEST { get; set; }
/// <summary>
/// 培训形式 线上培训/线下培训 委外培训
/// </summary>
[Description("培训形式")]
[FormFieldEdit]
[EnumName("TrainType")]
public TrainType? TRAINTYPE { get; set; }
/// <summary>
/// 培训老师
/// </summary>
[Description("培训老师")]
public ICollection<T_SE_NEW_USERS_TEACHER> Nav_Teachers { get; set; }
}
}

View File

@ -21,6 +21,19 @@ namespace APT.MS.Domain.Entities.SE
/// </summary>
[Description("导航: 培训记录")]
public T_SE_NEW_USER_DETAIL Nav_Record { get; set; }
/// <summary>
/// 考试记录 就是会有值,但是新增字段旧数据问题
/// </summary>
[Description("考试记录")]
[DataFieldForeignKey("Nav_Text", "Nav_ListPaper")]
public Guid? TEXT_ID { get; set; }
/// <summary>
/// 考试记录
/// </summary>
[Description("考试记录")]
public T_SE_NEW_USER_DETAIL_TEXT Nav_Text { get; set; }
/// <summary>
/// 人员ID
/// </summary>

View File

@ -0,0 +1,48 @@
using APT.BaseData.Domain.Entities.FM;
using APT.BaseData.Domain.Enums;
using APT.Infrastructure.Core;
using APT.MS.Domain.Enums;
using System;
using System.Collections.Generic;
using System.ComponentModel;
namespace APT.MS.Domain.Entities.SE
{
/// <summary>
/// 培训老师
/// </summary>
[Description("培训老师")]
public class T_SE_NEW_USERS_TEACHER : MesEntityBase
{
/// <summary>
/// 新注册用户
/// </summary>
[Description("新注册用户")]
[FormFieldTable]
[FormFieldQuery]
[FormFieldEdit]
[DataFieldForeignKey("Nav_Users", "Nav_Teachers")]
public Guid? NEW_USERS_ID { get; set; }
/// <summary>
/// 新注册用户
/// </summary>
[Description("新注册用户")]
public T_SE_NEW_USERS Nav_Users { get; set; }
/// <summary>
/// 培训老师
/// </summary>
[Description("培训老师")]
[FormFieldTable]
[FormFieldQuery]
[FormFieldEdit]
[DataFieldForeignKey("Nav_User")]
public Guid? USER_ID { get; set; }
/// <summary>
/// 培训老师
/// </summary>
[Description("培训老师")]
public T_FM_USER Nav_User { get; set; }
}
}

View File

@ -0,0 +1,60 @@
using APT.BaseData.Domain.Entities.FM;
using APT.Infrastructure.Core;
using System;
using System.Collections.Generic;
using System.ComponentModel;
namespace APT.MS.Domain.Entities.SE
{
/// <summary>
/// 人员试题
/// </summary>
[Description("人员试题")]
public class T_SE_NEW_USER_DETAIL_TEXT : MesEntityBase
{
/// <summary>
/// 培训记录
/// </summary>
[Description("培训记录")]
[DataFieldForeignKey("Nav_Record")]
public Guid RECORD_ID { get; set; }
/// <summary>
/// 导航: 培训记录
/// </summary>
[Description("导航: 培训记录")]
public T_SE_NEW_USER_DETAIL Nav_Record { get; set; }
/// <summary>
/// 人员ID
/// </summary>
[Description("人员")]
[DataFieldForeignKey("Nav_User")]
public Guid? USER_ID { get; set; }
/// <summary>
/// 导航: 人员
/// </summary>
[Description("导航: 人员")]
public T_FM_USER Nav_User { get; set; }
/// <summary>
/// 试题
/// </summary>
[Description("试题")]
public ICollection<T_SE_NEW_USER_DETAIL_PAPER> Nav_ListPaper { get; set; }
/// <summary>
/// 考试得分
/// </summary>
[Description("考试得分")]
public int? SCORE { get; set; }
/// <summary>
/// 考试次数
/// </summary>
[Description("考试次数")]
public int TEXT_TIMES { get; set; } = 1;
/// <summary>
/// 考试是否通过
/// </summary>
[Description("考试是否通过")]
public bool ISPASS { get; set; } = false;
}
}

View File

@ -0,0 +1,28 @@
using System;
using System.Collections.Generic;
using APT.BaseData.Domain.Entities;
using APT.Infrastructure.Api;
using APT.MS.Domain.Entities.SE;
namespace APT.BaseData.Domain.IServices
{
public interface ISENewUserService : ICommonService
{
/// <summary>
/// 获取试题 三级安全教育
/// </summary>
/// <param name="ORG_ID"></param>
/// <param name="RECORD_ID"></param>
/// <param name="USER_ID"></param>
/// <param name="eduCard"></param>
/// <param name="config"></param>
/// <param name="modelText"></param>
/// <param name="ListPapers"></param>
/// <param name="sendNotice"></param>
/// <param name="Msg"></param>
/// <param name="TEXT_TIMES"></param>
/// <returns></returns>
/// <exception cref="Exception"></exception>
bool GetText(Guid ORG_ID, Guid RECORD_ID, Guid USER_ID, T_SE_NEW_USERS eduCard, T_SE_SECONFIG config, ref T_SE_NEW_USER_DETAIL_TEXT modelText, ref List<T_SE_NEW_USER_DETAIL_PAPER> ListPapers, ref T_FM_NOTIFICATION_TASK sendNotice, ref string Msg, int TEXT_TIMES = 1);
}
}

View File

@ -0,0 +1,205 @@
using APT.BaseData.Domain.Entities;
using APT.BaseData.Domain.Entities.FM;
using APT.BaseData.Domain.Enums;
using APT.BaseData.Domain.Enums.PF;
using APT.BaseData.Domain.IServices;
using APT.BaseData.Domain.IServices.FM;
using APT.Infrastructure.Api;
using APT.Infrastructure.Core;
using APT.MS.Domain.Entities.SC;
using APT.MS.Domain.Entities.SE;
using APT.MS.Domain.Enums;
using InfluxData.Net.InfluxDb.Models.Responses;
using MySqlX.XDevAPI.Common;
using NPOI.SS.Formula.Functions;
using Org.BouncyCastle.Utilities;
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Linq;
using System.Reflection;
using System.Security.Cryptography;
namespace APT.BaseData.Services.DomainServices
{
/// <summary>
/// 获取会议Model T_SE_NEW_USERS
/// </summary>
public class SENewUserService : CommonService, ISENewUserService
{
IFMNotificationTaskService NotificationTaskService { get; set; }
public SENewUserService(IRepository repository, IFMNotificationTaskService notificationTaskService)
: base(repository)
{
NotificationTaskService = notificationTaskService;
}
/// <summary>
/// 获取试题 三级安全教育
/// </summary>
/// <param name="ORG_ID"></param>
/// <param name="RECORD_ID"></param>
/// <param name="USER_ID"></param>
/// <param name="eduCard"></param>
/// <param name="config"></param>
/// <param name="modelText"></param>
/// <param name="ListPapers"></param>
/// <param name="sendNotice"></param>
/// <param name="Msg"></param>
/// <param name="TEXT_TIMES"></param>
/// <returns></returns>
/// <exception cref="Exception"></exception>
public bool GetText(Guid ORG_ID, Guid RECORD_ID, Guid USER_ID, T_SE_NEW_USERS eduCard, T_SE_SECONFIG config, ref T_SE_NEW_USER_DETAIL_TEXT modelText, ref List<T_SE_NEW_USER_DETAIL_PAPER> ListPapers, ref T_FM_NOTIFICATION_TASK sendNotice, ref string Msg, int TEXT_TIMES = 1)
{
List<T_FM_NOTIFICATION_TASK> sendNotices = new List<T_FM_NOTIFICATION_TASK>();
if (config == null)
{
config = GetEntity<T_SE_SECONFIG>(t => true);
}
var SCount = 1;
var MCount = 1;
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;
}
if (config.S_TEST_COUNT > 0)
{
SCount = config.S_TEST_COUNT;
}
if (config.C_TEST_COUNT > 0)
{
CCount = config.C_TEST_COUNT;
}
}
}
var testidlist = new List<Guid>();
var testFilter = new BaseFilter(ORG_ID);
testFilter.Include = new string[] { "Nav_Points" };
var currStatus = eduCard.TRAIN_STATUS;
IEnumerable<T_SE_TEST_ENUM_POINT> pointS = new List<T_SE_TEST_ENUM_POINT>();
string PointName = "";
if (eduCard.TRAIN_STATUS == SEThreeLevelSafeTrainType.)
{
PointName = "三级安全教育-公司级";
}
else if (eduCard.TRAIN_STATUS == SEThreeLevelSafeTrainType.)
{
PointName = "三级安全教育-部门级";
}
else if (eduCard.TRAIN_STATUS == SEThreeLevelSafeTrainType.)
{
PointName = "三级安全教育-班组级";
}
pointS = GetEntities<T_SE_TEST_ENUM_POINT>(t => t.NAME == PointName, new BaseFilter(ORG_ID));
if (pointS == null || pointS.Count() < 1)
{
throw new Exception("未找到试题知识点【" + PointName + "】的配置信息,配置路径:系统管理 > 安全教育培训配置 > 知识点类型。");
}
var pointIDS = pointS.Select(t => t.ID).ToList();
var allTests = GetEntities<T_SE_TEST>(st => st.Nav_Points.Any(pt => pointIDS.Contains((Guid)pt.POINT_ID)), testFilter).ToList();
foreach (var testPoint in pointIDS)
{
var havepoint = allTests.Where(st => st.Nav_Points.Any(pt => pt.POINT_ID == testPoint));
if (havepoint.Count() < 1)
{
var noPoint = GetEntity<T_SE_TEST_ENUM_POINT>(testPoint);
Msg += noPoint.NAME + ",";
}
}
if (Msg != "")
{
Msg = "知识点 " + Msg + " 没有题目!";
return false;
}
var SCurrentCount = allTests.Count(t => t.TYPE == SETestTypeEnum.);
var MCurrentCount = allTests.Count(t => t.TYPE == SETestTypeEnum.);
var CCurrentCount = allTests.Count(t => t.TYPE == SETestTypeEnum.);
Msg = "";
if (SCurrentCount < SCount)
{
Msg += "题库中题目数量不足!";
Msg += "单选题还需" + (SCount - SCurrentCount) + "题\n";
}
if (MCurrentCount < MCount)
{
Msg += "题库中题目数量不足!";
Msg += "多选题还需" + (MCount - MCurrentCount) + "题\n";
}
if (CCurrentCount < CCount)
{
Msg += "题库中题目数量不足!";
Msg += "是非题还需" + (CCount - CCurrentCount) + "题\n";
}
if (Msg != "")
{
Msg = "知识点 " + Msg + " 没有题目!";
return false;
}
CreateTestList(allTests, testidlist, pointIDS, (int)SETestTypeEnum., CCount);
CreateTestList(allTests, testidlist, pointIDS, (int)SETestTypeEnum., SCount);
CreateTestList(allTests, testidlist, pointIDS, (int)SETestTypeEnum., MCount);
if (testidlist.Count == 0 || testidlist.Count < (SCount + MCount + CCount))
{
Msg = "当前题库数据不足,未能正常生成试卷! 知识点:" + PointName + "是非题:" + CCount + "题,单选题:" + SCount + "题,多选题:" + MCount + "题!";
return false;
}
modelText = new T_SE_NEW_USER_DETAIL_TEXT();
Guid TEXT_ID = Guid.NewGuid();
modelText.RECORD_ID = RECORD_ID;
modelText.ID = TEXT_ID;
modelText.ORG_ID = ORG_ID;
modelText.USER_ID = USER_ID;
modelText.TEXT_TIMES = TEXT_TIMES;
if (ListPapers == null)
{
ListPapers = new List<T_SE_NEW_USER_DETAIL_PAPER>();
}
List<T_SE_NEW_USER_DETAIL_PAPER> temp = new List<T_SE_NEW_USER_DETAIL_PAPER>();
testidlist.ForEach(testid =>
{
var p = new T_SE_NEW_USER_DETAIL_PAPER
{
RECORD_ID = RECORD_ID,
ID = Guid.NewGuid(),
ORG_ID = ORG_ID,
TEXT_ID = TEXT_ID,
USER_ID = USER_ID,
TEST_ID = testid,
ANSWER = 0,
};
temp.Add(p);
});
ListPapers = temp;
string userNAME = GetEntity<T_FM_USER>(USER_ID).NAME;
sendNotice = NotificationTaskService.InsertUserNoticeTaskModel("三级安全教育在线答题-" + eduCard.TRAIN_STATUS.GetDescription(), modelText.ID, modelText.ORG_ID, USER_ID, userNAME, DateTime.Now, DateTime.Now.AddHours(12), 1, "SE061_PAPERPAGE");
return true;
}
private void CreateTestList(List<T_SE_TEST> allTests, List<Guid> ret, List<Guid> contentFilter, int type, int count)
{
var tests = allTests.Where(st =>
st.Nav_Points.Any(pt => contentFilter.Contains(pt.POINT_ID.Value)) &&
st.TYPE == (SETestTypeEnum)type).OrderBy(t => Guid.NewGuid()).Take(count); ;
if (tests != null)
{
ret.AddRange(tests.Select(it => it.ID));
}
}
}
}

View File

@ -135,7 +135,7 @@ namespace APT.WebApi.Models
conn = conn.Replace("mh_jy_ops", "mh_jy_ly");
break;
case 15:
conn = conn.Replace("mh_jy_ops", "mh_jy_kljn");
conn = conn.Replace("mh_jy_ops", "mh_jy_jnkl");
break;
case 20:
conn = conn.Replace("mh_jy_ops", "mh_jy_xt");

View File

@ -65,6 +65,7 @@ namespace APT.HM.WebApi.App_Start
builder.RegisterType<BSSafeCheckService>().As<IBSSafeCheckService>().InstancePerLifetimeScope();
builder.RegisterType<BIHomeService>().As<IBIHomeService>().InstancePerLifetimeScope();
builder.RegisterType<FMNoticeService>().As<IFMNoticeService>().InstancePerLifetimeScope();
builder.RegisterType<SENewUserService>().As<ISENewUserService>().InstancePerLifetimeScope();
}
}
}

View File

@ -947,6 +947,91 @@ namespace APT.SC.WebApi.Controllers.Api.BI
});
}
/// <summary>
/// 查询
/// </summary>
/// <param name="pageFilter"></param>
/// <returns></returns>
[HttpPost, Route("OrderPagedPost")]
public PagedActionResult<T_FM_USER_POST> OrderPagedPost([FromBody] KeywordPageFilter pageFilter)
{
return SafeGetPagedData(delegate (PagedActionResult<T_FM_USER_POST> result)
{
Guid DEPARTMENT_ID = Guid.Empty;
if (pageFilter.FilterGroup.Rules != null && pageFilter.FilterGroup.Rules.Any())
{
var rules = pageFilter.FilterGroup.Rules;
foreach (var rule in rules)
{
if (rule.Field == "DEPARTMENT_ID")
{
DEPARTMENT_ID = new Guid(rule.Value.ToString());
rules.Remove(rule);
break;
}
}
pageFilter.FilterGroup.Rules = rules;
}
else if (pageFilter.FilterGroup.Groups != null && pageFilter.FilterGroup.Groups.Any())
{
var rules = pageFilter.FilterGroup.Groups.ToList()[0].Rules;
foreach (var rule in rules)
{
if (rule.Field == "DEPARTMENT_ID")
{
DEPARTMENT_ID = new Guid(rule.Value.ToString());
rules.Remove(rule);
break;
}
}
//pageFilter.FilterGroup.Groups = rules;
}
if (DEPARTMENT_ID != Guid.Empty)
{
List<Guid> listPersonID = new List<Guid>();
var IListPersons = GetEntities<T_FM_USER>(e => e.DEPARTMENT_ID.HasValue && e.DEPARTMENT_ID == DEPARTMENT_ID && e.PERSON_ID.HasValue && !e.IS_DELETED && e.ENABLE_STATUS == 0, null, null);
if (IListPersons != null && IListPersons.Any())
{
foreach (var item in IListPersons)
{
listPersonID.Add(item.PERSON_ID.Value);
}
}
//var listPersonID = GetEntities<T_FM_USER>(e => e.DEPARTMENT_ID.HasValue && e.DEPARTMENT_ID == DEPARTMENT_ID && e.PERSON_ID.HasValue, null, null).ToList().Select(e => e.PERSON_ID);
if (listPersonID != null && listPersonID.Any())
{
var IlistPerson = GetEntities<T_FM_PERSON>(e => e.POST_ID.HasValue && listPersonID.Contains(e.ID), null, null);
if (IlistPerson != null && IlistPerson.Any())
{
List<Guid> listPostID = new List<Guid>();
foreach (var item in IlistPerson)
{
listPostID.Add(item.POST_ID.Value);
}
if (listPostID.Any())
{
Expression<Func<T_FM_USER_POST, bool>> expression = e => !e.IS_DELETED && e.STATUS == 1 && listPostID.Contains(e.ID);
PagedActionResult<T_FM_USER_POST> orderPageEntities = this.GetOrderPageEntities<T_FM_USER_POST>(expression, pageFilter, null);
result.Data = orderPageEntities.Data;
result.TotalCount = orderPageEntities.TotalCount;
}
}
}
}
else
{
result.Data = new List<T_FM_USER_POST>();
result.TotalCount = 0;
}
});
}
#endregion
}
}

View File

@ -1,13 +1,11 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Linq.Expressions;
using System.Reflection.Metadata;
using APT.BaseData.Domain.Entities;
using APT.BaseData.Domain.Entities.FM;
using APT.BaseData.Domain.Entities.OP;
using APT.BaseData.Domain.Enums;
using APT.BaseData.Domain.Enums.PF;
using APT.BaseData.Domain.IServices;
using APT.BaseData.Domain.IServices.FM;
using APT.Infrastructure.Api;
using APT.Infrastructure.Core;
@ -17,13 +15,7 @@ using APT.MS.Domain.Entities.SC.SC;
using APT.MS.Domain.Entities.SE;
using APT.MS.Domain.Enums;
using APT.Utility;
using Castle.Core.Internal;
using ICSharpCode.SharpZipLib.Core;
using Microsoft.AspNetCore.Mvc;
using NPOI.HSSF.Record;
using NPOI.HSSF.Record.Chart;
using NPOI.SS.Formula.Functions;
using NPOI.Util;
namespace APT.SC.WebApi.Controllers.Api.SE
{
@ -32,10 +24,12 @@ namespace APT.SC.WebApi.Controllers.Api.SE
{
IFMNotificationTaskService NotificationTaskService { get; set; }
IFMUserService UserService { get; set; }
public SENewUsersController(IFMNotificationTaskService notificationTaskService, IFMUserService userService)
ISENewUserService NewUserService { get; set; }
public SENewUsersController(IFMNotificationTaskService notificationTaskService, IFMUserService userService, ISENewUserService newUserService)
{
NotificationTaskService = notificationTaskService;
UserService = userService;
NewUserService = newUserService;
}
/// <summary>
/// 更新
@ -52,7 +46,19 @@ namespace APT.SC.WebApi.Controllers.Api.SE
T_FM_NOTIFICATION_TASK finishNotice = null;
var Nav_NewUserDetail = entity.Nav_NewUserDetail;
var Nav_Files = entity.Nav_Files;
entity.Nav_Files = null;
var Nav_Teachers = entity.Nav_Teachers;
entity.Nav_Teachers = null;
if (Nav_Files != null && Nav_Files.Count() > 0)
{
foreach (var item in Nav_Files)
item.Nav_NewUser = null;
}
if (Nav_Teachers != null && Nav_Teachers.Count() > 0)
{
foreach (var item in Nav_Teachers)
item.Nav_User = null;
}
if (entity.PUBLISH != null && entity.PUBLISH.Equals("SaveAndNotify"))
{
var endTime = DateTime.Now.AddDays(10);
@ -206,6 +212,8 @@ namespace APT.SC.WebApi.Controllers.Api.SE
BantchSaveEntityNoCommit(Nav_Files);
if (detailFiles.Any())
BantchSaveEntityNoCommit(detailFiles);
if (Nav_Teachers.Any())
BantchSaveEntityNoCommit(Nav_Teachers);
});
return true;
@ -292,130 +300,149 @@ namespace APT.SC.WebApi.Controllers.Api.SE
T_OG_SAFE_PDT_SIGNED signRecord = null;
T_OG_SAFE_PDT_SIGNED_POST signPost = null;
T_SE_NEW_USER_DETAIL_TEXT UserText = null;
if (eduCard.IS_CREATETEST == SETrainNeedSuvey.)
{
List<T_FM_NOTIFICATION_TASK> sendNotices = new List<T_FM_NOTIFICATION_TASK>();
var config = GetEntity<T_SE_SECONFIG>(t => true);
var SCount = 1;
var MCount = 1;
var CCount = 1;
if (config != null)
//生成考题
string Msg = string.Empty;
bool isOK = NewUserService.GetText(eduCard.ORG_ID.Value, currID, userID.Value, eduCard, null, ref UserText, ref Nav_Papers, ref sendNotice, ref Msg, 1);
if (!isOK)
{
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;
throw new Exception(Msg);
}
else
{
//保持原来的版本
if (config.M_TEST_COUNT > 0)
{
MCount = config.M_TEST_COUNT;
}
if (config.S_TEST_COUNT > 0)
{
SCount = config.S_TEST_COUNT;
}
if (config.C_TEST_COUNT > 0)
{
CCount = config.C_TEST_COUNT;
}
}
}
var testidlist = new List<Guid>();
var testFilter = new BaseFilter(filter.GetOrgId());
testFilter.Include = new string[] { "Nav_Points" };
var currStatus = eduCard.TRAIN_STATUS;
IEnumerable<T_SE_TEST_ENUM_POINT> pointS = new List<T_SE_TEST_ENUM_POINT>();
string PointName = "";
if (eduCard.TRAIN_STATUS == SEThreeLevelSafeTrainType.)
{
PointName = "三级安全教育-公司级";
}
else if (eduCard.TRAIN_STATUS == SEThreeLevelSafeTrainType.)
{
PointName = "三级安全教育-部门级";
}
else if (eduCard.TRAIN_STATUS == SEThreeLevelSafeTrainType.)
{
PointName = "三级安全教育-班组级";
}
pointS = GetEntities<T_SE_TEST_ENUM_POINT>(t => t.NAME == PointName, new BaseFilter(orgId));
if (pointS == null || pointS.Count() < 1)
{
throw new Exception("未找到试题知识点【" + PointName + "】的配置信息,配置路径:系统管理 > 安全教育培训配置 > 知识点类型。");
}
var pointIDS = pointS.Select(t => t.ID).ToList();
var allTests = GetEntities<T_SE_TEST>(st => st.Nav_Points.Any(pt => pointIDS.Contains((Guid)pt.POINT_ID)), testFilter).ToList();
//List<T_FM_NOTIFICATION_TASK> sendNotices = new List<T_FM_NOTIFICATION_TASK>();
//var config = GetEntity<T_SE_SECONFIG>(t => true);
//var SCount = 1;
//var MCount = 1;
//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;
// }
// if (config.S_TEST_COUNT > 0)
// {
// SCount = config.S_TEST_COUNT;
// }
// if (config.C_TEST_COUNT > 0)
// {
// CCount = config.C_TEST_COUNT;
// }
// }
//}
//var testidlist = new List<Guid>();
//var testFilter = new BaseFilter(filter.GetOrgId());
//testFilter.Include = new string[] { "Nav_Points" };
//var currStatus = eduCard.TRAIN_STATUS;
//IEnumerable<T_SE_TEST_ENUM_POINT> pointS = new List<T_SE_TEST_ENUM_POINT>();
//string PointName = "";
//if (eduCard.TRAIN_STATUS == SEThreeLevelSafeTrainType.公司级)
//{
// PointName = "三级安全教育-公司级";
//}
//else if (eduCard.TRAIN_STATUS == SEThreeLevelSafeTrainType.部门级)
//{
// PointName = "三级安全教育-部门级";
//}
//else if (eduCard.TRAIN_STATUS == SEThreeLevelSafeTrainType.班组级)
//{
// PointName = "三级安全教育-班组级";
//}
//pointS = GetEntities<T_SE_TEST_ENUM_POINT>(t => t.NAME == PointName, new BaseFilter(orgId));
//if (pointS == null || pointS.Count() < 1)
//{
// throw new Exception("未找到试题知识点【" + PointName + "】的配置信息,配置路径:系统管理 > 安全教育培训配置 > 知识点类型。");
//}
//var pointIDS = pointS.Select(t => t.ID).ToList();
//var allTests = GetEntities<T_SE_TEST>(st => st.Nav_Points.Any(pt => pointIDS.Contains((Guid)pt.POINT_ID)), testFilter).ToList();
////var errorMsg = "";
////if (errorMsg != "")
////{
//// throw new Exception("知识点 " + errorMsg + " 没有题目!");
////}
//var errorMsg = "";
//foreach (var testPoint in pointIDS)
//{
// var havepoint = allTests.Where(st => st.Nav_Points.Any(pt => pt.POINT_ID == testPoint));
// if (havepoint.Count() < 1)
// {
// var noPoint = GetEntity<T_SE_TEST_ENUM_POINT>(testPoint);
// errorMsg += noPoint.NAME + ",";
// }
//}
//if (errorMsg != "")
//{
// throw new Exception("知识点 " + errorMsg + " 没有题目!");
//}
var errorMsg = "";
foreach (var testPoint in pointIDS)
{
var havepoint = allTests.Where(st => st.Nav_Points.Any(pt => pt.POINT_ID == testPoint));
if (havepoint.Count() < 1)
{
var noPoint = GetEntity<T_SE_TEST_ENUM_POINT>(testPoint);
errorMsg += noPoint.NAME + ",";
}
}
if (errorMsg != "")
{
throw new Exception("知识点 " + errorMsg + " 没有题目!");
}
var SCurrentCount = allTests.Count(t => t.TYPE == SETestTypeEnum.);
var MCurrentCount = allTests.Count(t => t.TYPE == SETestTypeEnum.);
var CCurrentCount = allTests.Count(t => t.TYPE == SETestTypeEnum.);
errorMsg = "";
if (SCurrentCount < SCount)
{
errorMsg += "题库中题目数量不足!";
errorMsg += "单选题还需" + (SCount - SCurrentCount) + "题\n";
}
if (MCurrentCount < MCount)
{
errorMsg += "题库中题目数量不足!";
errorMsg += "多选题还需" + (MCount - MCurrentCount) + "题\n";
}
if (CCurrentCount < CCount)
{
errorMsg += "题库中题目数量不足!";
errorMsg += "是非题还需" + (CCount - CCurrentCount) + "题\n";
}
if (errorMsg != "")
{
throw new Exception(errorMsg);
}
CreateTestList(allTests, testidlist, pointIDS, (int)SETestTypeEnum., CCount);
CreateTestList(allTests, testidlist, pointIDS, (int)SETestTypeEnum., SCount);
CreateTestList(allTests, testidlist, pointIDS, (int)SETestTypeEnum., MCount);
//var SCurrentCount = allTests.Count(t => t.TYPE == SETestTypeEnum.单选题);
//var MCurrentCount = allTests.Count(t => t.TYPE == SETestTypeEnum.多选题);
//var CCurrentCount = allTests.Count(t => t.TYPE == SETestTypeEnum.是非题);
//errorMsg = "";
//if (SCurrentCount < SCount)
//{
// errorMsg += "题库中题目数量不足!";
// errorMsg += "单选题还需" + (SCount - SCurrentCount) + "题\n";
//}
//if (MCurrentCount < MCount)
//{
// errorMsg += "题库中题目数量不足!";
// errorMsg += "多选题还需" + (MCount - MCurrentCount) + "题\n";
//}
//if (CCurrentCount < CCount)
//{
// errorMsg += "题库中题目数量不足!";
// errorMsg += "是非题还需" + (CCount - CCurrentCount) + "题\n";
//}
//if (errorMsg != "")
//{
// throw new Exception(errorMsg);
//}
//CreateTestList(allTests, testidlist, pointIDS, (int)SETestTypeEnum.是非题, CCount);
//CreateTestList(allTests, testidlist, pointIDS, (int)SETestTypeEnum.单选题, SCount);
//CreateTestList(allTests, testidlist, pointIDS, (int)SETestTypeEnum.多选题, MCount);
if (testidlist.Count == 0 || testidlist.Count < (SCount + MCount + CCount))
{
throw new Exception("当前题库数据不足,未能正常生成试卷! 知识点:" + PointName + "是非题:" + CCount + "题,单选题:" + SCount + "题,多选题:" + MCount + "题!");
}
Nav_Papers = new List<T_SE_NEW_USER_DETAIL_PAPER>();
testidlist.ForEach(testid =>
{
var p = new T_SE_NEW_USER_DETAIL_PAPER
{
RECORD_ID = currID,
ID = Guid.NewGuid(),
ORG_ID = filter.GetOrgId(),
USER_ID = userID,
TEST_ID = testid,
ANSWER = 0,
};
Nav_Papers.Add(p);
});
sendNotice = NotificationTaskService.InsertUserNoticeTaskModel("三级安全教育在线答题-" + eduCard.TRAIN_STATUS.GetDescription(), currID, filter.GetOrgId(), (Guid)userID, GetEntity<T_FM_USER>((Guid)userID).NAME, DateTime.Now, DateTime.Now.AddHours(12), 1, "SE061_PAPERPAGE");
//if (testidlist.Count == 0 || testidlist.Count < (SCount + MCount + CCount))
//{
// throw new Exception("当前题库数据不足,未能正常生成试卷! 知识点:" + PointName + "是非题:" + CCount + "题,单选题:" + SCount + "题,多选题:" + MCount + "题!");
//}
//Nav_Papers = new List<T_SE_NEW_USER_DETAIL_PAPER>();
//UserText = new T_SE_NEW_USER_DETAIL_TEXT();
//UserText.RECORD_ID = currID;
//UserText.ID = Guid.NewGuid();
//UserText.ORG_ID = filter.GetOrgId();
//UserText.USER_ID = userID;
//UserText.TEXT_TIMES = 1;
//testidlist.ForEach(testid =>
//{
// var p = new T_SE_NEW_USER_DETAIL_PAPER
// {
// RECORD_ID = currID,
// ID = Guid.NewGuid(),
// ORG_ID = filter.GetOrgId(),
// TEXT_ID = UserText.ID,
// USER_ID = userID,
// TEST_ID = testid,
// ANSWER = 0,
// };
// Nav_Papers.Add(p);
//});
//sendNotice = NotificationTaskService.InsertUserNoticeTaskModel("三级安全教育在线答题-" + eduCard.TRAIN_STATUS.GetDescription(), UserText.ID, UserText.ORG_ID, (Guid)userID, GetEntity<T_FM_USER>((Guid)userID).NAME, DateTime.Now, DateTime.Now.AddHours(12), 1, "SE061_PAPERPAGE");
}
else
{
@ -507,6 +534,8 @@ namespace APT.SC.WebApi.Controllers.Api.SE
AddEntityNoCommit(sendNotice);
if (Nav_Papers != null && Nav_Papers.Any())
BantchAddEntityNoCommit(Nav_Papers);
if (UserText != null)//考试记录
UpdateEntityNoCommit(UserText);
if (units.Any())
BantchSaveEntityNoCommit(units);
//CreateNextLevel wyw 从 方法体抽出来的
@ -536,13 +565,14 @@ namespace APT.SC.WebApi.Controllers.Api.SE
public T_SE_SECONFIG Nav_Config { get; set; }
public Guid TaskID { get; set; }
public Guid ORG_ID { get; set; }
public Guid TEXT_ID { get; set; }
}
[HttpPost, Route("GetUserPapers")]
public JsonActionResult<TrainUserPaperModel> GetUserPapers([FromBody] KeywordFilter filter)
{
var papers = GetEntities<T_SE_NEW_USER_DETAIL_PAPER>(null, filter).ToList();
var papers = GetEntities<T_SE_NEW_USER_DETAIL_PAPER>(null, filter).OrderByDescending(e => e.Nav_Text.TEXT_TIMES).ToList();
var config = GetEntity<T_SE_SECONFIG>(t => true);
var ret = new JsonActionResult<TrainUserPaperModel>();
ret.Data = new TrainUserPaperModel
@ -564,11 +594,21 @@ namespace APT.SC.WebApi.Controllers.Api.SE
{
throw new Exception("试卷不能为空");
}
Guid TEXT_ID = entity.TEXT_ID;
if (TEXT_ID == Guid.Empty)
{
string Msg = "传参有误";
if (DataHelper.GetRequestType(Request.Headers) == 2)
{
Msg += ",请升级APP或者清理缓存后再试";
}
Msg += "";
throw new Exception(Msg);
}
var score = 0;
var sscore = entity.Nav_Config.S_TEST_SCORE;
var mscore = entity.Nav_Config.M_TEST_SCORE;
var cscore = entity.Nav_Config.C_TEST_SCORE;
foreach (var item in entity.Nav_Papers)
{
if (item.ANSWER != 0 && item.ANSWER == item.Nav_Test.ANSWER)
@ -587,33 +627,84 @@ namespace APT.SC.WebApi.Controllers.Api.SE
}
}
}
var passMark = GetEntity<T_SE_SECONFIG>(t => t.IS_DELETED == false);
if (passMark != null)
T_SE_NEW_USERS eduCard = null;
T_SE_NEW_USER_DETAIL_TEXT modelTextNew = null;
var finishNotice = NotificationTaskService.GetTaskFinishModel(entity.TaskID);
//var passMark = GetEntity<T_SE_SECONFIG>(t => t.IS_DELETED == false);
T_SE_NEW_USER_DETAIL_TEXT modelText = GetEntity<T_SE_NEW_USER_DETAIL_TEXT>(TEXT_ID);
modelText.SCORE = score;
if (modelText.SCORE >= entity.Nav_Config.PASS_MARK)
{
if (passMark.PASS_MARK != 0)
modelText.ISPASS = true;
}
else
{
if (score < passMark.PASS_MARK)
modelText.ISPASS = false;
}
if (entity.Nav_Config != null) // 原本有这个判断 现改为没这个 就不判断了 好像也合理
{
throw new Exception("考试成绩:" + score + "分小于标准线" + passMark.PASS_MARK + ",请重新考试!");
//if (entity.Nav_Config.PASS_MARK != 0)
//{
// if (score < entity.Nav_Config.PASS_MARK)
// {
if (!modelText.ISPASS)
{
try
{
eduCard = GetEntity<T_SE_NEW_USERS>(entity.Nav_Papers[0].Nav_Record.EDU_CARD_ID);
List<T_SE_NEW_USER_DETAIL_PAPER> listPaper = null;
T_FM_NOTIFICATION_TASK taskReSend = null;
//重新生成考题
string Msg = string.Empty;
bool isOK = NewUserService.GetText(modelText.ORG_ID.Value, modelText.RECORD_ID, modelText.USER_ID.Value, eduCard, null, ref modelTextNew, ref listPaper, ref taskReSend, ref Msg, modelText.TEXT_TIMES + 1);
UnifiedCommit(() =>
{
if (finishNotice != null)
UpdateEntityNoCommit(finishNotice);
BantchSaveEntityNoCommit(entity.Nav_Papers);//更新试题明细
//试题更新
if (modelText != null)//旧试题
UpdateEntityNoCommit(modelText);
if (modelTextNew != null)//新试题
UpdateEntityNoCommit(modelTextNew);
if (listPaper != null)//新试题
BantchSaveEntityNoCommit(listPaper);
if (taskReSend != null)//新待办
UpdateEntityNoCommit(taskReSend);
});
if (!isOK)
{
throw new Exception("考试成绩:" + score + "分小于标准线" + entity.Nav_Config.PASS_MARK + ",请重新考试!" + Msg);
}
}
catch
{
//新加表单 T_SE_NEW_USER_DETAIL_TEXT 以支持多次考试 手动添加数据
throw new Exception("获取试卷信息失败,请联系系统运维人员!");
}
throw new Exception("考试成绩:" + score + "分小于标准线" + entity.Nav_Config.PASS_MARK + ",请重新考试!");
}
// }
//}
}
foreach (var item in entity.Nav_Papers)
{
item.SCORE = score;
}
T_SE_NEW_USERS eduCard = null;
T_SE_NEW_USERS newEduCard = null;
List<T_SE_NEW_USER_DETAIL> userDetailList = null;
T_SE_NEW_USER_DETAIL currDetail = null;
T_FM_NOTIFICATION_TASK sendNotice = null;
var finishNotice = NotificationTaskService.GetTaskFinishModel(entity.TaskID);
CreateNextLevel(entity.ORG_ID, entity.Nav_Papers[0].RECORD_ID, entity.TaskID, entity.Nav_Papers[0].Nav_Record.EDU_CARD_ID, score.ToString(), ref eduCard, ref newEduCard, ref userDetailList, ref currDetail, ref sendNotice);
T_OG_SAFE_PDT_SIGNED signRecord = null;
T_OG_SAFE_PDT_SIGNED_POST signPost = null;
//考试通过 继续往下的流程
CreateNextLevel(entity.ORG_ID, entity.Nav_Papers[0].RECORD_ID, entity.TaskID, entity.Nav_Papers[0].Nav_Record.EDU_CARD_ID, score.ToString(), ref eduCard, ref newEduCard, ref userDetailList, ref currDetail, ref sendNotice);
var currUser = GetEntity<T_FM_USER>(APT.Infrastructure.Api.AppContext.CurrentSession.UserID.Value);
if (currUser.DEPARTMENT_ID.HasValue)
{
@ -622,6 +713,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
GetOG001(entity.TaskID, currUser, currPerson, departInfo, ref signRecord, ref signPost, ref sendNotice);
}
UnifiedCommit(() =>
{
if (finishNotice != null)
@ -645,6 +737,10 @@ namespace APT.SC.WebApi.Controllers.Api.SE
UpdateEntityNoCommit(signRecord);
if (signPost != null)
UpdateEntityNoCommit(signPost);
//试题更新
if (modelText != null)//新试题
UpdateEntityNoCommit(modelText);
});
return true;
});
@ -695,7 +791,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
}
currDetailT.STATUS = SEThreeLevelSafeTrainStatus.;
}
var isFinish = userDetails.Count(t => t.NEXT_DEPARTMENT_ID == currDetailT.NEXT_DEPARTMENT_ID && t.STATUS == 0);
var isFinish = userDetails.Count(t => t.NEXT_DEPARTMENT_ID == currDetailT.NEXT_DEPARTMENT_ID && t.ID != currID && t.STATUS == 0);
eduCard = GetEntity<T_SE_NEW_USERS>(eduCardID);
var currSattus = SEThreeLevelSafeTrainType.;
if (isFinish == 0 && eduCard.TRAIN_STATUS != SEThreeLevelSafeTrainType.)
@ -1035,6 +1131,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
public void GetOG001(Guid TaskID, T_FM_USER currUser, T_FM_PERSON currPerson, T_FM_DEPARTMENT departInfo, ref T_OG_SAFE_PDT_SIGNED signRecord, ref T_OG_SAFE_PDT_SIGNED_POST signPost, ref T_FM_NOTIFICATION_TASK sendNoticeRef)
{
// 如果没有继续触发下一级 直接触发 安全生产责任制签订 OG001_SHOWPRINT 如果找不到对应的责任制 就给对应组织安全员(或班长) 触发今日提醒
//如果对应的人员有 责任状了 就不再次触发
if (sendNoticeRef == null && currPerson.POST_ID.HasValue)//&& currPerson.POST_ID.HasValue 三级安全教育的没填 岗位
{
var post = GetEntity<T_SC_DEPARTMENT_POST>(t => t.Nav_Dept.DEPARTMENT_ID == currUser.DEPARTMENT_ID && t.DEPOST_ID == currPerson.POST_ID, new string[] { "Nav_Dept.Nav_Post" });
@ -1044,6 +1141,10 @@ namespace APT.SC.WebApi.Controllers.Api.SE
if (standardCreate != null)
{
var chargeUser = GetEntity<T_FM_USER>(t => t.DEPARTMENT_ID == post.Nav_Dept.Nav_Post.DEPARTMENT_ID && t.Nav_Person.POST_ID == post.Nav_Dept.Nav_Post.DEPOST_ID && t.ENABLE_STATUS == 0);
//没有签订 才进行签订
T_OG_SAFE_PDT_SIGNED_POST check = GetEntity<T_OG_SAFE_PDT_SIGNED_POST>(e => e.USER_ID.HasValue && e.USER_ID.Value == currUser.ID && e.POST_ID.HasValue && e.POST_ID.Value == currPerson.POST_ID.Value && e.CHARGE_USER_ID.HasValue && e.CHARGE_USER_ID.Value == chargeUser.ID);
if (check == null)
{
if (chargeUser != null)
{
signRecord = new T_OG_SAFE_PDT_SIGNED
@ -1075,6 +1176,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
}
}
}
}
else
{
//找不到 责任制
@ -1100,7 +1202,12 @@ namespace APT.SC.WebApi.Controllers.Api.SE
else
{
var UserPost = GetEntity<T_FM_USER_POST>(currPerson.POST_ID.Value);
sendNoticeRef = NotificationTaskService.InsertUserNoticeTaskModel("请为《" + currUser.NAME + "" + UserPost.NAME + "》绑定责任制岗位并上传责任状,并让其签订", TaskID, currUser.ORG_ID, sendUser.ID, sendUser.NAME, DateTime.Now, DateTime.Now.AddDays(7), (int)FMNoticeTypeEnum., "PF135");
string Title = "请为《" + currUser.NAME + "" + UserPost.NAME + "》绑定责任制岗位并上传责任状,并让其签订";
var chaen = GetEntity<T_FM_NOTIFICATION_TASK>(e => e.USER_ID == sendUser.ID && e.SOURCE_FORMCODE == "PF135" && e.NOTICE_TITLE == Title);
if (chaen == null)
{
sendNoticeRef = NotificationTaskService.InsertUserNoticeTaskModel(Title, TaskID, currUser.ORG_ID, sendUser.ID, sendUser.NAME, DateTime.Now, DateTime.Now.AddDays(7), (int)FMNoticeTypeEnum., "PF135");
}
}
}
}

View File

@ -54666,6 +54666,216 @@ using APT.MS.Domain.Entities.HM;
return WitEntity(null, filter);
}
}
#endregion
#region NewUsersTeacher-
/// <summary>
/// 培训老师
/// </summary>
[Route("api/SE/NewUsersTeacher")]
public partial class NewUsersTeacherController : AuthorizeApiController<T_SE_NEW_USERS_TEACHER>
{
/// <summary>
/// 查询所有数据
/// </summary>
/// <param name="filter">过滤实体</param>
/// <returns></returns>
[HttpPost, Route("Entities")]
public JsonActionResult<IEnumerable<T_SE_NEW_USERS_TEACHER>> Entities([FromBody]KeywordFilter filter)
{
return WitEntities(null, filter);
}
/// <summary>
/// 排序查询所有数据
/// </summary>
/// <param name="filter">过滤实体</param>
/// <returns></returns>
[HttpPost, Route("OrderEntities")]
public JsonActionResult<IEnumerable<T_SE_NEW_USERS_TEACHER>> OrderEntities([FromBody]KeywordFilter filter)
{
return WitOrderEntities(null, filter);
}
/// <summary>
/// 分页查询数据
/// </summary>
/// <param name="pageFilter">分页过滤实体</param>
/// <returns></returns>
[HttpPost, Route("Paged")]
public PagedActionResult<T_SE_NEW_USERS_TEACHER> Paged([FromBody]KeywordPageFilter pageFilter)
{
return WitPaged(null, pageFilter);
}
/// <summary>
/// 排序分页查询数据
/// </summary>
/// <param name="pageFilter">分页过滤实体</param>
/// <returns></returns>
[HttpPost, Route("OrderPaged")]
public PagedActionResult<T_SE_NEW_USERS_TEACHER> OrderPaged([FromBody]KeywordPageFilter pageFilter)
{
return WitOrderPaged(null, pageFilter);
}
/// <summary>
/// 根据主键删除数据
/// </summary>
/// <param name="id">主键ID</param>
/// <returns></returns>
[HttpGet, Route("Delete")]
public JsonActionResult<bool> Delete(string id)
{
return WitRealDelete(id);
}
/// <summary>
/// 更新或新增数据
/// </summary>
/// <param name="entity">对象实体</param>
/// <returns></returns>
[HttpPost, Route("Update")]
public JsonActionResult<bool> Update([FromBody]T_SE_NEW_USERS_TEACHER entity)
{
return WitUpdate(entity);
}
/// <summary>
/// 批量更新
/// </summary>
/// <param name="entity">对象实体</param>
/// <returns></returns>
[HttpPost, Route("BatchUpdate")]
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_SE_NEW_USERS_TEACHER> entity)
{
return WitBantchUpdate(entity?.Data);
}
/// <summary>
/// 批量删除数据
/// </summary>
/// <param name="ids">id字符串id用逗号分隔</param>
/// <returns></returns>
[HttpGet, Route("BatchDelete")]
public JsonActionResult<bool> BatchDelete(string ids)
{
return WitRealBatchDelete(ids);
}
/// <summary>
/// 获得单条实体数据
/// </summary>
/// <param name="filter">过滤实体</param>
/// <returns></returns>
[HttpPost, Route("Get")]
public JsonActionResult<T_SE_NEW_USERS_TEACHER> Get([FromBody] KeywordFilter filter)
{
return WitEntity(null, filter);
}
}
#endregion
#region NewUserDetailText-
/// <summary>
/// 人员试题
/// </summary>
[Route("api/SE/NewUserDetailText")]
public partial class NewUserDetailTextController : AuthorizeApiController<T_SE_NEW_USER_DETAIL_TEXT>
{
/// <summary>
/// 查询所有数据
/// </summary>
/// <param name="filter">过滤实体</param>
/// <returns></returns>
[HttpPost, Route("Entities")]
public JsonActionResult<IEnumerable<T_SE_NEW_USER_DETAIL_TEXT>> Entities([FromBody]KeywordFilter filter)
{
return WitEntities(null, filter);
}
/// <summary>
/// 排序查询所有数据
/// </summary>
/// <param name="filter">过滤实体</param>
/// <returns></returns>
[HttpPost, Route("OrderEntities")]
public JsonActionResult<IEnumerable<T_SE_NEW_USER_DETAIL_TEXT>> OrderEntities([FromBody]KeywordFilter filter)
{
return WitOrderEntities(null, filter);
}
/// <summary>
/// 分页查询数据
/// </summary>
/// <param name="pageFilter">分页过滤实体</param>
/// <returns></returns>
[HttpPost, Route("Paged")]
public PagedActionResult<T_SE_NEW_USER_DETAIL_TEXT> Paged([FromBody]KeywordPageFilter pageFilter)
{
return WitPaged(null, pageFilter);
}
/// <summary>
/// 排序分页查询数据
/// </summary>
/// <param name="pageFilter">分页过滤实体</param>
/// <returns></returns>
[HttpPost, Route("OrderPaged")]
public PagedActionResult<T_SE_NEW_USER_DETAIL_TEXT> OrderPaged([FromBody]KeywordPageFilter pageFilter)
{
return WitOrderPaged(null, pageFilter);
}
/// <summary>
/// 根据主键删除数据
/// </summary>
/// <param name="id">主键ID</param>
/// <returns></returns>
[HttpGet, Route("Delete")]
public JsonActionResult<bool> Delete(string id)
{
return WitRealDelete(id);
}
/// <summary>
/// 更新或新增数据
/// </summary>
/// <param name="entity">对象实体</param>
/// <returns></returns>
[HttpPost, Route("Update")]
public JsonActionResult<bool> Update([FromBody]T_SE_NEW_USER_DETAIL_TEXT entity)
{
return WitUpdate(entity);
}
/// <summary>
/// 批量更新
/// </summary>
/// <param name="entity">对象实体</param>
/// <returns></returns>
[HttpPost, Route("BatchUpdate")]
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_SE_NEW_USER_DETAIL_TEXT> entity)
{
return WitBantchUpdate(entity?.Data);
}
/// <summary>
/// 批量删除数据
/// </summary>
/// <param name="ids">id字符串id用逗号分隔</param>
/// <returns></returns>
[HttpGet, Route("BatchDelete")]
public JsonActionResult<bool> BatchDelete(string ids)
{
return WitRealBatchDelete(ids);
}
/// <summary>
/// 获得单条实体数据
/// </summary>
/// <param name="filter">过滤实体</param>
/// <returns></returns>
[HttpPost, Route("Get")]
public JsonActionResult<T_SE_NEW_USER_DETAIL_TEXT> Get([FromBody] KeywordFilter filter)
{
return WitEntity(null, filter);
}
}
#endregion
#region RenewalTrain-