培训计划
This commit is contained in:
parent
1c2637dc3a
commit
282f5453a6
@ -247,6 +247,12 @@ namespace APT.BaseData.Domain.Enums
|
||||
[Description("默认限制时间")]
|
||||
Default = 0,
|
||||
|
||||
/// <summary>
|
||||
/// 默认限制时间 2
|
||||
/// </summary>
|
||||
[Description("默认限制时间")]
|
||||
DefaultLong = 2,
|
||||
|
||||
#region BS 0 -49
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -1197,7 +1197,10 @@ namespace APT.BaseData.Services.Services.FM
|
||||
T_FM_NOTIFICATION_TASK notice = new T_FM_NOTIFICATION_TASK();
|
||||
notice.CODE = CODE + index;
|
||||
notice.NOTICE_TITLE = Name;
|
||||
notice.SOURCE_DATA_ID = DataIds[index];
|
||||
if (DataIds != null)
|
||||
{
|
||||
notice.SOURCE_DATA_ID = DataIds[index];
|
||||
}
|
||||
notice.ORG_ID = OrgId;
|
||||
notice.ID = Guid.NewGuid();
|
||||
notice.TASK_STARTDT = startTime;
|
||||
@ -1465,6 +1468,11 @@ namespace APT.BaseData.Services.Services.FM
|
||||
//如果没有配置 默认当天
|
||||
dtResult = dtNow.Value.Date.AddDays(1).AddMilliseconds(-1);//
|
||||
}
|
||||
if (taskSet == null && TASK_TYPE == FMTASKTYPE.DefaultLong)
|
||||
{
|
||||
//如果没有配置 默认当月
|
||||
dtResult = Convert.ToDateTime(dtNow.Value.Date.ToString("yyyy-MM-01 00:00:00")).AddMonths(1).AddMilliseconds(-1);
|
||||
}
|
||||
else
|
||||
{
|
||||
//获取默认值
|
||||
|
||||
@ -23,6 +23,7 @@ using APT.MS.Domain.Entities.SC.PE;
|
||||
using APT.MS.Domain.Entities.SC.PR;
|
||||
using APT.MS.Domain.Entities.SC.PT;
|
||||
using APT.MS.Domain.Entities.SC.SC;
|
||||
using APT.MS.Domain.Entities.SE;
|
||||
using APT.MS.Domain.Entities.SK;
|
||||
using APT.MS.Domain.Entities.TL;
|
||||
using APT.MS.Domain.Entities.WB;
|
||||
@ -7528,6 +7529,9 @@ namespace APT.BaseData.Services.DomainServices
|
||||
case "WB/WBRegister/UserAgreeNew":
|
||||
result = RegisterAgreeNew(entityInt, modelApp, listAppDetail, taskFinish, listTaskNext, isLast, isApprovel);
|
||||
break;
|
||||
case "SE/SETrainPlan/PlanAuditNew":
|
||||
result = SE071PlanAuditNew(entityInt, modelApp, listAppDetail, taskFinish, listTaskNext, isLast, isApprovel);
|
||||
break;
|
||||
default:
|
||||
//SysLogService.AddLog(APT.Infrastructure.Api.AppContext.CurrentSession.OrgId.Value, APT.Infrastructure.Api.AppContext.CurrentSession.UserID.Value, PFSysLogTypeEnum.CommonApproveCallBack, "PF119", "审批流回调方法未完善", "PFApproveCallBackService=>CallBack: " + CALLBACK_INTERFACE, DATA_ID);
|
||||
break;
|
||||
@ -11343,7 +11347,7 @@ namespace APT.BaseData.Services.DomainServices
|
||||
List<T_SK_HIDDEN_DANGER_RECTIFY_RECORD> records = new List<T_SK_HIDDEN_DANGER_RECTIFY_RECORD>();
|
||||
List<T_SK_HIDDEN_DANGER_RECTIFY_RECORD_PHOTOA> photoList = new List<T_SK_HIDDEN_DANGER_RECTIFY_RECORD_PHOTOA>();
|
||||
List<T_SK_HIDDEN_DANGER_RECTIFY_RECORD_BASIC> basicList = new List<T_SK_HIDDEN_DANGER_RECTIFY_RECORD_BASIC>();
|
||||
|
||||
|
||||
List<T_SK_HIDDEN_DANGER_RECTIFY_NOTICE> notices = new List<T_SK_HIDDEN_DANGER_RECTIFY_NOTICE>();
|
||||
List<T_SK_HIDDEN_DANGER_RECTIFY_NOTICE_FILE> nfileList = new List<T_SK_HIDDEN_DANGER_RECTIFY_NOTICE_FILE>();
|
||||
List<T_SK_HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL> noticeDetails = new List<T_SK_HIDDEN_DANGER_RECTIFY_NOTICE_DETAIL>();
|
||||
@ -11531,7 +11535,7 @@ namespace APT.BaseData.Services.DomainServices
|
||||
notice.CHECK_TYPE_ID = entity.CHECK_TYPE_ID;
|
||||
notice.PLANCHECKFREQUENCY = entity.PLANCHECKFREQUENCY;
|
||||
notice.DEPARTMENT_TYPE = entity.DEPARTMENT_TYPE;
|
||||
notice.CHECK_TIME = entity.CHECK_TIME!=null ? entity.CHECK_TIME :DateTime.Now;
|
||||
notice.CHECK_TIME = entity.CHECK_TIME != null ? entity.CHECK_TIME : DateTime.Now;
|
||||
notice.CHECK_PERSON = entity.CHECK_PERSON;
|
||||
notices.Add(notice);
|
||||
if (entity.Nav_ReportFiles != null && entity.Nav_ReportFiles.Any())
|
||||
@ -12125,7 +12129,7 @@ namespace APT.BaseData.Services.DomainServices
|
||||
entity.STATUS = PFStandardStatus.Reading;
|
||||
var record = this.GetEntity<T_SK_HIDDEN_DANGER_RECTIFY_RECORD>(t => t.ID == entity.HIDDEN_DANGER_RECTIFY_RECORD_ID, "Nav_AcceptUser");
|
||||
record.RECITIFY_TIME = entity.DELAY_RECITIFY_TIME;
|
||||
var noticeTasks = this.GetEntities<T_FM_NOTIFICATION_TASK>(t => t.SOURCE_DATA_ID == entity.HIDDEN_DANGER_RECTIFY_RECORD_ID && t.NOTICE_STATUS == 0,new BaseFilter(entity.ORG_ID));
|
||||
var noticeTasks = this.GetEntities<T_FM_NOTIFICATION_TASK>(t => t.SOURCE_DATA_ID == entity.HIDDEN_DANGER_RECTIFY_RECORD_ID && t.NOTICE_STATUS == 0, new BaseFilter(entity.ORG_ID));
|
||||
noticeTasks.ForEach(t => { t.TASK_ENDDT = entity.DELAY_RECITIFY_TIME.Value; });
|
||||
T_FM_NOTIFICATION_TASK notice = null;
|
||||
if (record != null && record.ACCEPT_USER_ID != null)
|
||||
@ -15257,8 +15261,129 @@ namespace APT.BaseData.Services.DomainServices
|
||||
detailUser = detailUser.Substring(0, 1990);
|
||||
}
|
||||
SysLogService.AddLog(approve.ORG_ID.Value, loginUserId, PFSysLogTypeEnum.ExceptionApproveDetailReduce, "PF119", "审批流明细减少", detailUser, data + detail);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region SE 新版功能
|
||||
|
||||
/// <summary>
|
||||
/// 培训记录申请
|
||||
/// </summary>
|
||||
/// <param name="id"></param>
|
||||
/// <returns></returns>
|
||||
public bool SE071PlanAuditNew(T_PF_APPROVE entityInt, T_PF_APPROVE modelApp, List<T_PF_APPROVE_DETAIL> listAppDetail, T_FM_NOTIFICATION_TASK taskFinish, List<T_FM_NOTIFICATION_TASK> listTaskNext, bool isLast = false, bool isApprovel = true)
|
||||
{
|
||||
#region 审批公用
|
||||
|
||||
if (modelApp == null && isApprovel)
|
||||
{
|
||||
string taskCodeCheck = String.Empty;
|
||||
bool result = GetApproject2(entityInt, ref modelApp, ref listAppDetail, ref taskFinish, ref taskCodeCheck, ref isLast, ref listTaskNext);
|
||||
if (!result)
|
||||
{
|
||||
throw new Exception("审批失败!");
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
if (!isLast && isApprovel)
|
||||
{
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
if (modelApp != null)
|
||||
UpdateEntityNoCommit(modelApp); //保存主表
|
||||
if (listAppDetail != null && listAppDetail.Count > 0)//添加组合数据 修改的安全库、隐患库
|
||||
BantchSaveEntityNoCommit(listAppDetail);
|
||||
if (taskFinish != null)
|
||||
UpdateEntityNoCommit(taskFinish);
|
||||
if (listTaskNext != null && listTaskNext.Count > 0)//下个审批节点
|
||||
BantchSaveEntityNoCommit(listTaskNext);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
var modelPlan = GetEntity<T_SE_TRAIN_PLAN>(t => t.ID == modelApp.DATA_ID);
|
||||
modelPlan.STATUS = PFStandardStatus.Archived;
|
||||
|
||||
IEnumerable<T_SE_TRAIN_PLAN_DETAIL> listDetail = GetEntities<T_SE_TRAIN_PLAN_DETAIL>(e => e.PLAN_ID == modelPlan.ID);
|
||||
listDetail.ForEach(e => e.STATUS = PFStandardStatus.Sign);
|
||||
|
||||
List<T_FM_NOTIFICATION_TASK> listTaskNotice = null;//部门今日提醒
|
||||
if (modelPlan.TYPE == PlanType.Company)
|
||||
{
|
||||
//今日 提醒 涉及到的生产组织 制定 部门 年度培训计划
|
||||
var depIDs = listDetail.Where(e => e.DEPARTMENT_ID.HasValue).Select(e => e.DEPARTMENT_ID.Value).Distinct().ToList();
|
||||
if (depIDs != null && depIDs.Count() > 0)
|
||||
{
|
||||
var listDep = GetEntities<T_FM_DEPARTMENT>(e => depIDs.Contains(e.ID) && e.DEPARTMENT_STATUS == 1 && e.ENABLE_STATUS == 0, "Nav_User");
|
||||
Dictionary<Guid, T_FM_USER> dicUser = new Dictionary<Guid, T_FM_USER>();
|
||||
List<Guid> UserId = null;
|
||||
List<string> userName = null;
|
||||
|
||||
var listRoles = GetEntities<T_PF_APPROVAL_ROLE>(e => e.NAME == "部门安全员" && !e.ISHEAD && !e.IS_DELETED);
|
||||
if (listRoles != null && listRoles.Any())
|
||||
{
|
||||
var RoleIDS = listRoles.Select(e => e.ID);
|
||||
var userS = GetEntities<T_FM_USER>(e => e.ENABLE_STATUS == 0 && e.APPROVE_ROLE_ID.HasValue && e.DEPARTMENT_ID.HasValue && RoleIDS.Contains(e.APPROVE_ROLE_ID.Value));
|
||||
foreach (var item in userS)
|
||||
{
|
||||
if (dicUser.ContainsKey(item.DEPARTMENT_ID.Value))
|
||||
continue;
|
||||
dicUser.Add(item.DEPARTMENT_ID.Value, item);
|
||||
}
|
||||
}
|
||||
foreach (var item in listDep)
|
||||
{
|
||||
if (!dicUser.ContainsKey(item.ID) && item.USER_ID.HasValue)
|
||||
{
|
||||
dicUser.Add(item.ID, item.Nav_User);
|
||||
}
|
||||
}
|
||||
if (dicUser.Count > 0)
|
||||
{
|
||||
UserId = new List<Guid>();
|
||||
userName = new List<string>();
|
||||
foreach (var item in dicUser)
|
||||
{
|
||||
UserId.Add(item.Value.ID);
|
||||
userName.Add(item.Value.NAME);
|
||||
}
|
||||
}
|
||||
listTaskNotice = NotificationTaskService.InsertUserNoticeTaskModels("请根据公司及年度培训计划,按需制定部门级年度培训计划", null, modelPlan.ORG_ID, UserId, userName, DateTime.Now, 2, "", FMTASKTYPE.Default);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
//部门 直接结束 没用特殊 操作
|
||||
}
|
||||
|
||||
UnifiedCommit(() =>
|
||||
{
|
||||
//表单逻辑信息
|
||||
if (modelPlan != null)
|
||||
UpdateEntityNoCommit(modelPlan);
|
||||
if (listDetail != null && listDetail.Count() > 0)//下个审批节点
|
||||
BantchSaveEntityNoCommit(listDetail);
|
||||
if (listTaskNotice != null && listTaskNotice.Count > 0)//下个审批节点
|
||||
BantchSaveEntityNoCommit(listTaskNotice);
|
||||
|
||||
//审批
|
||||
if (modelApp != null)
|
||||
UpdateEntityNoCommit(modelApp); //保存主表
|
||||
if (listAppDetail != null && listAppDetail.Count > 0)//添加组合数据 修改的安全库、隐患库
|
||||
BantchSaveEntityNoCommit(listAppDetail);
|
||||
if (taskFinish != null)
|
||||
UpdateEntityNoCommit(taskFinish);
|
||||
if (listTaskNext != null && listTaskNext.Count > 0)//下个审批节点
|
||||
BantchSaveEntityNoCommit(listTaskNext);
|
||||
});
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
||||
130902
APT.Data.Migrations/Migrations/20251104072719_wyw2025110401.Designer.cs
generated
Normal file
130902
APT.Data.Migrations/Migrations/20251104072719_wyw2025110401.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
289
APT.Data.Migrations/Migrations/20251104072719_wyw2025110401.cs
Normal file
289
APT.Data.Migrations/Migrations/20251104072719_wyw2025110401.cs
Normal file
@ -0,0 +1,289 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace APT.Data.Migrations.Migrations
|
||||
{
|
||||
public partial class wyw2025110401 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.CreateTable(
|
||||
name: "T_SE_TRAIN_PLAN",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
PLAN_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
TYPE = table.Column<int>(type: "int", nullable: false),
|
||||
YEAR = table.Column<int>(type: "int", nullable: false),
|
||||
LAUNCH_TIME = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
END_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
LAUNCH_USER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
PLAN_NAME = table.Column<string>(type: "nvarchar(200)", maxLength: 200, nullable: true),
|
||||
GUIDE_PRINCIPLE = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
TRAIN_REQUIREMENT = table.Column<string>(type: "nvarchar(500)", maxLength: 500, nullable: true),
|
||||
PERSENT = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
|
||||
STATUS = table.Column<int>(type: "int", 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_TRAIN_PLAN", x => x.ID);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SE_TRAIN_PLAN_T_FM_DEPARTMENT_DEPARTMENT_ID",
|
||||
column: x => x.DEPARTMENT_ID,
|
||||
principalTable: "T_FM_DEPARTMENT",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SE_TRAIN_PLAN_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_TRAIN_PLAN_T_FM_USER_LAUNCH_USER_ID",
|
||||
column: x => x.LAUNCH_USER_ID,
|
||||
principalTable: "T_FM_USER",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "T_SE_TRAIN_PLAN_DETAIL",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
PLAN_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
PLAN_DETAIL_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
DATE_TRAIN = table.Column<DateTime>(type: "datetime2", nullable: false),
|
||||
IN_OUT = table.Column<int>(type: "int", nullable: false),
|
||||
TYPE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
NAME = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
|
||||
OBJECT = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true),
|
||||
TRAINTYPE = table.Column<int>(type: "int", nullable: false),
|
||||
CHECKTYPE = table.Column<int>(type: "int", nullable: false),
|
||||
CLASSHOUR = table.Column<int>(type: "int", nullable: false),
|
||||
SPRINTTYPE = table.Column<int>(type: "int", nullable: false),
|
||||
ISALL = table.Column<bool>(type: "bit", nullable: false),
|
||||
DEPARTMENT_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
STATUS = table.Column<int>(type: "int", 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_TRAIN_PLAN_DETAIL", x => x.ID);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SE_TRAIN_PLAN_DETAIL_T_FM_DEPARTMENT_DEPARTMENT_ID",
|
||||
column: x => x.DEPARTMENT_ID,
|
||||
principalTable: "T_FM_DEPARTMENT",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SE_TRAIN_PLAN_DETAIL_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_TRAIN_PLAN_DETAIL_T_SE_TRAIN_PLAN_PLAN_ID",
|
||||
column: x => x.PLAN_ID,
|
||||
principalTable: "T_SE_TRAIN_PLAN",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SE_TRAIN_PLAN_DETAIL_T_SE_TRAIN_TYPE_ENUM_TYPE_ID",
|
||||
column: x => x.TYPE_ID,
|
||||
principalTable: "T_SE_TRAIN_TYPE_ENUM",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "T_SE_TRAIN_PLAN_FILE",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
PLAN_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", 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_TRAIN_PLAN_FILE", x => x.ID);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SE_TRAIN_PLAN_FILE_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_TRAIN_PLAN_FILE_T_PF_IMG_FILE_IMG_FILE_ID",
|
||||
column: x => x.IMG_FILE_ID,
|
||||
principalTable: "T_PF_IMG_FILE",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SE_TRAIN_PLAN_FILE_T_SE_TRAIN_PLAN_PLAN_ID",
|
||||
column: x => x.PLAN_ID,
|
||||
principalTable: "T_SE_TRAIN_PLAN",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
PLAN_DETAIL_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
DEPARTMENT_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_TRAIN_PLAN_DETAIL_DEPARTMENT", x => x.ID);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT_T_FM_DEPARTMENT_DEPARTMENT_ID",
|
||||
column: x => x.DEPARTMENT_ID,
|
||||
principalTable: "T_FM_DEPARTMENT",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT_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_TRAIN_PLAN_DETAIL_DEPARTMENT_T_SE_TRAIN_PLAN_DETAIL_PLAN_DETAIL_ID",
|
||||
column: x => x.PLAN_DETAIL_ID,
|
||||
principalTable: "T_SE_TRAIN_PLAN_DETAIL",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SE_TRAIN_PLAN_DEPARTMENT_ID",
|
||||
table: "T_SE_TRAIN_PLAN",
|
||||
column: "DEPARTMENT_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SE_TRAIN_PLAN_LAUNCH_USER_ID",
|
||||
table: "T_SE_TRAIN_PLAN",
|
||||
column: "LAUNCH_USER_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SE_TRAIN_PLAN_ORG_ID",
|
||||
table: "T_SE_TRAIN_PLAN",
|
||||
column: "ORG_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT_ID",
|
||||
table: "T_SE_TRAIN_PLAN_DETAIL",
|
||||
column: "DEPARTMENT_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SE_TRAIN_PLAN_DETAIL_ORG_ID",
|
||||
table: "T_SE_TRAIN_PLAN_DETAIL",
|
||||
column: "ORG_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SE_TRAIN_PLAN_DETAIL_PLAN_ID",
|
||||
table: "T_SE_TRAIN_PLAN_DETAIL",
|
||||
column: "PLAN_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SE_TRAIN_PLAN_DETAIL_TYPE_ID",
|
||||
table: "T_SE_TRAIN_PLAN_DETAIL",
|
||||
column: "TYPE_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT_DEPARTMENT_ID",
|
||||
table: "T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT",
|
||||
column: "DEPARTMENT_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT_ORG_ID",
|
||||
table: "T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT",
|
||||
column: "ORG_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT_PLAN_DETAIL_ID",
|
||||
table: "T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT",
|
||||
column: "PLAN_DETAIL_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SE_TRAIN_PLAN_FILE_IMG_FILE_ID",
|
||||
table: "T_SE_TRAIN_PLAN_FILE",
|
||||
column: "IMG_FILE_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SE_TRAIN_PLAN_FILE_ORG_ID",
|
||||
table: "T_SE_TRAIN_PLAN_FILE",
|
||||
column: "ORG_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SE_TRAIN_PLAN_FILE_PLAN_ID",
|
||||
table: "T_SE_TRAIN_PLAN_FILE",
|
||||
column: "PLAN_ID");
|
||||
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_SE_TRAIN_PLAN_FILE");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_SE_TRAIN_PLAN_DETAIL");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_SE_TRAIN_PLAN");
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1548,9 +1548,6 @@ namespace APT.Data.Migrations.Migrations
|
||||
b.Property<int>("NUM")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid?>("Nav_UnitID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("ORG_ID")
|
||||
.IsRequired()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
@ -1580,14 +1577,14 @@ namespace APT.Data.Migrations.Migrations
|
||||
|
||||
b.HasIndex("CHARGEUSER_ID");
|
||||
|
||||
b.HasIndex("Nav_UnitID");
|
||||
|
||||
b.HasIndex("ORG_ID");
|
||||
|
||||
b.HasIndex("PARENT_ID");
|
||||
|
||||
b.HasIndex("PERSON_ID");
|
||||
|
||||
b.HasIndex("PRODUCTION_UNIT_ID");
|
||||
|
||||
b.HasIndex("USER_ID");
|
||||
|
||||
b.ToTable("T_FM_DEPARTMENT");
|
||||
@ -70769,6 +70766,307 @@ namespace APT.Data.Migrations.Migrations
|
||||
b.ToTable("T_SE_TRAIN_NOTIFY_PERSONS");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN", b =>
|
||||
{
|
||||
b.Property<Guid>("ID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("CREATER_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime?>("CREATE_TIME")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid?>("DEPARTMENT_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime?>("END_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<string>("GUIDE_PRINCIPLE")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<bool>("IS_DELETED")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<DateTime>("LAUNCH_TIME")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid?>("LAUNCH_USER_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("MODIFIER_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime?>("MODIFY_TIME")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid?>("ORG_ID")
|
||||
.IsRequired()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<decimal?>("PERSENT")
|
||||
.HasColumnType("decimal(18,2)");
|
||||
|
||||
b.Property<Guid?>("PLAN_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("PLAN_NAME")
|
||||
.HasMaxLength(200)
|
||||
.HasColumnType("nvarchar(200)");
|
||||
|
||||
b.Property<int>("STATUS")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<string>("TRAIN_REQUIREMENT")
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<int>("TYPE")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("YEAR")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("DEPARTMENT_ID");
|
||||
|
||||
b.HasIndex("LAUNCH_USER_ID");
|
||||
|
||||
b.HasIndex("ORG_ID");
|
||||
|
||||
b.ToTable("T_SE_TRAIN_PLAN");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN_DETAIL", b =>
|
||||
{
|
||||
b.Property<Guid>("ID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("CHECKTYPE")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("CLASSHOUR")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid?>("CREATER_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime?>("CREATE_TIME")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<DateTime>("DATE_TRAIN")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid?>("DEPARTMENT_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
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<int>("IN_OUT")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<bool>("ISALL")
|
||||
.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<string>("NAME")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<string>("OBJECT")
|
||||
.HasMaxLength(100)
|
||||
.HasColumnType("nvarchar(100)");
|
||||
|
||||
b.Property<Guid?>("ORG_ID")
|
||||
.IsRequired()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("PLAN_DETAIL_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("PLAN_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("SPRINTTYPE")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("STATUS")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("TRAINTYPE")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid?>("TYPE_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("DEPARTMENT_ID");
|
||||
|
||||
b.HasIndex("ORG_ID");
|
||||
|
||||
b.HasIndex("PLAN_ID");
|
||||
|
||||
b.HasIndex("TYPE_ID");
|
||||
|
||||
b.ToTable("T_SE_TRAIN_PLAN_DETAIL");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT", b =>
|
||||
{
|
||||
b.Property<Guid>("ID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("CREATER_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime?>("CREATE_TIME")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid?>("DEPARTMENT_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
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?>("ORG_ID")
|
||||
.IsRequired()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("PLAN_DETAIL_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("DEPARTMENT_ID");
|
||||
|
||||
b.HasIndex("ORG_ID");
|
||||
|
||||
b.HasIndex("PLAN_DETAIL_ID");
|
||||
|
||||
b.ToTable("T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN_FILE", 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<Guid>("IMG_FILE_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?>("ORG_ID")
|
||||
.IsRequired()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("PLAN_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("IMG_FILE_ID");
|
||||
|
||||
b.HasIndex("ORG_ID");
|
||||
|
||||
b.HasIndex("PLAN_ID");
|
||||
|
||||
b.ToTable("T_SE_TRAIN_PLAN_FILE");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD", b =>
|
||||
{
|
||||
b.Property<Guid>("ID")
|
||||
@ -94205,10 +94503,6 @@ namespace APT.Data.Migrations.Migrations
|
||||
.HasForeignKey("CHARGEUSER_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_Unit")
|
||||
.WithMany()
|
||||
.HasForeignKey("Nav_UnitID");
|
||||
|
||||
b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
|
||||
.WithMany()
|
||||
.HasForeignKey("ORG_ID")
|
||||
@ -94225,6 +94519,11 @@ namespace APT.Data.Migrations.Migrations
|
||||
.HasForeignKey("PERSON_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER_PRODUCTION_UNIT_SET", "Nav_Unit")
|
||||
.WithMany()
|
||||
.HasForeignKey("PRODUCTION_UNIT_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
|
||||
.WithMany()
|
||||
.HasForeignKey("USER_ID")
|
||||
@ -118524,6 +118823,117 @@ namespace APT.Data.Migrations.Migrations
|
||||
b.Navigation("Nav_User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN", b =>
|
||||
{
|
||||
b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
|
||||
.WithMany()
|
||||
.HasForeignKey("DEPARTMENT_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
|
||||
.WithMany()
|
||||
.HasForeignKey("LAUNCH_USER_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
|
||||
.WithMany()
|
||||
.HasForeignKey("ORG_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Nav_Department");
|
||||
|
||||
b.Navigation("Nav_Org");
|
||||
|
||||
b.Navigation("Nav_User");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN_DETAIL", b =>
|
||||
{
|
||||
b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
|
||||
.WithMany()
|
||||
.HasForeignKey("DEPARTMENT_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.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN", "Nav_Plan")
|
||||
.WithMany("Nav_ListPlanDetail")
|
||||
.HasForeignKey("PLAN_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_TYPE_ENUM", "Nav_TrainTypeEnum")
|
||||
.WithMany()
|
||||
.HasForeignKey("TYPE_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.Navigation("Nav_Department");
|
||||
|
||||
b.Navigation("Nav_Org");
|
||||
|
||||
b.Navigation("Nav_Plan");
|
||||
|
||||
b.Navigation("Nav_TrainTypeEnum");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT", b =>
|
||||
{
|
||||
b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
|
||||
.WithMany()
|
||||
.HasForeignKey("DEPARTMENT_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.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN_DETAIL", "Nav_PlanDetail")
|
||||
.WithMany("Nav_ListDetailDepartment")
|
||||
.HasForeignKey("PLAN_DETAIL_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Nav_Department");
|
||||
|
||||
b.Navigation("Nav_Org");
|
||||
|
||||
b.Navigation("Nav_PlanDetail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN_FILE", b =>
|
||||
{
|
||||
b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
|
||||
.WithMany()
|
||||
.HasForeignKey("IMG_FILE_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
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_TRAIN_PLAN", "Nav_Plan")
|
||||
.WithMany("Nav_Files")
|
||||
.HasForeignKey("PLAN_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Nav_ImgFile");
|
||||
|
||||
b.Navigation("Nav_Org");
|
||||
|
||||
b.Navigation("Nav_Plan");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD", b =>
|
||||
{
|
||||
b.HasOne("APT.MS.Domain.Entities.SE.T_SE_TRAIN_NOTIFY", "Nav_Notify")
|
||||
@ -129688,6 +130098,18 @@ namespace APT.Data.Migrations.Migrations
|
||||
b.Navigation("Nav_TrainUserList");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN", b =>
|
||||
{
|
||||
b.Navigation("Nav_Files");
|
||||
|
||||
b.Navigation("Nav_ListPlanDetail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN_DETAIL", b =>
|
||||
{
|
||||
b.Navigation("Nav_ListDetailDepartment");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_RECORD", b =>
|
||||
{
|
||||
b.Navigation("Nav_Files");
|
||||
|
||||
@ -10216,6 +10216,57 @@ builder.HasIndex("NAME").IsUnique();
|
||||
builder.Property(t => t.NAME).HasMaxLength(100);
|
||||
builder.HasIndex("NAME").IsUnique();
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region TrainPlan
|
||||
public partial class SETrainPlanMap :APTEntityBaseMap<T_SE_TRAIN_PLAN>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_SE_TRAIN_PLAN> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
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.LAUNCH_USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(t => t.PLAN_NAME).HasMaxLength(200);
|
||||
builder.Property(t => t.GUIDE_PRINCIPLE).HasMaxLength(500);
|
||||
builder.Property(t => t.TRAIN_REQUIREMENT).HasMaxLength(500);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region TrainPlanDetail
|
||||
public partial class SETrainPlanDetailMap :APTEntityBaseMap<T_SE_TRAIN_PLAN_DETAIL>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_SE_TRAIN_PLAN_DETAIL> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_Plan).WithMany(t=>t.Nav_ListPlanDetail).HasForeignKey(t => t.PLAN_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Ignore(t => t.MONTH);
|
||||
builder.HasOne(t => t.Nav_TrainTypeEnum).WithMany().HasForeignKey(t => t.TYPE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(t => t.NAME).HasMaxLength(100);
|
||||
builder.Property(t => t.OBJECT).HasMaxLength(100);
|
||||
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region TrainPlanDetailDepartment
|
||||
public partial class SETrainPlanDetailDepartmentMap :APTEntityBaseMap<T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_PlanDetail).WithMany(t=>t.Nav_ListDetailDepartment).HasForeignKey(t => t.PLAN_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region TrainPlanFile
|
||||
public partial class SETrainPlanFileMap :APTEntityBaseMap<T_SE_TRAIN_PLAN_FILE>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_SE_TRAIN_PLAN_FILE> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_Plan).WithMany(t=>t.Nav_Files).HasForeignKey(t => t.PLAN_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region TrainRecordReport
|
||||
|
||||
142
APT.MS.Domain/Entities/SC/SE/T_SE_TRAIN_PLAN.cs
Normal file
142
APT.MS.Domain/Entities/SC/SE/T_SE_TRAIN_PLAN.cs
Normal file
@ -0,0 +1,142 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
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_TRAIN_PLAN : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 计划年度
|
||||
/// </summary>
|
||||
[Description("计划年度")]
|
||||
public Guid? PLAN_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 计划类型
|
||||
/// </summary>
|
||||
[Description("计划类型")]
|
||||
[EnumName("PlanType")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public PlanType TYPE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 计划年度
|
||||
/// </summary>
|
||||
[Description("计划年度")]
|
||||
[FormFieldTable]
|
||||
[FormFieldEdit]
|
||||
[FormFieldQuery]
|
||||
public int YEAR { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 发起时间
|
||||
/// </summary>
|
||||
[Description("发起时间")]
|
||||
[FormFieldTable]
|
||||
[FormFieldEdit]
|
||||
[FormFieldQuery]
|
||||
public DateTime LAUNCH_TIME { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 发起时间
|
||||
/// </summary>
|
||||
[Description("截止时间")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public DateTime? END_TIME { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 发起部门ID
|
||||
/// </summary>
|
||||
[Description("发起部门")]
|
||||
[FormFieldTable]
|
||||
[FormFieldEdit]
|
||||
[FormFieldQuery]
|
||||
[DataFieldForeignKey("Nav_Department")]
|
||||
public Guid? DEPARTMENT_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航: 发起部门
|
||||
/// </summary>
|
||||
[Description("导航: 发起部门")]
|
||||
public T_FM_DEPARTMENT Nav_Department { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 发起人员ID
|
||||
/// </summary>
|
||||
[Description("发起人员")]
|
||||
[FormFieldTable]
|
||||
[FormFieldEdit]
|
||||
[FormFieldQuery]
|
||||
[DataFieldForeignKey("Nav_User")]
|
||||
public Guid? LAUNCH_USER_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航: 发起人员
|
||||
/// </summary>
|
||||
[Description("导航: 发起人员")]
|
||||
public T_FM_USER Nav_User { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 计划名称
|
||||
/// </summary>
|
||||
[Description("计划名称")]
|
||||
[DataFieldLength(200)]
|
||||
[FormFieldTable]
|
||||
[FormFieldEdit]
|
||||
[FormFieldQuery]
|
||||
public string PLAN_NAME { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 指导原则
|
||||
/// </summary>
|
||||
[Description("指导原则")]
|
||||
[DataFieldLength(500)]
|
||||
[FormFieldEdit]
|
||||
public string GUIDE_PRINCIPLE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 培训要求
|
||||
/// </summary>
|
||||
[Description("培训要求")]
|
||||
[DataFieldLength(500)]
|
||||
[FormFieldEdit]
|
||||
public string TRAIN_REQUIREMENT { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 导航: 年度培训计划详情
|
||||
/// </summary>
|
||||
[Description("导航: 年度培训计划详情")]
|
||||
[FormFieldEdit]
|
||||
public ICollection<T_SE_TRAIN_PLAN_DETAIL> Nav_ListPlanDetail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 导航属性:附件
|
||||
/// </summary>
|
||||
[Description("导航属性:附件")]
|
||||
public ICollection<T_SE_TRAIN_PLAN_FILE> Nav_Files { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 完成比例 50% => 50
|
||||
/// </summary>
|
||||
[Description("完成比例")]
|
||||
[FormFieldTable]
|
||||
public decimal? PERSENT { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// </summary>
|
||||
[Description("状态")]
|
||||
[EnumName("PFStandardStatus")]
|
||||
[FormFieldTable]
|
||||
[FormFieldQuery]
|
||||
public PFStandardStatus STATUS { get; set; }
|
||||
}
|
||||
}
|
||||
155
APT.MS.Domain/Entities/SC/SE/T_SE_TRAIN_PLAN_DETAIL.cs
Normal file
155
APT.MS.Domain/Entities/SC/SE/T_SE_TRAIN_PLAN_DETAIL.cs
Normal file
@ -0,0 +1,155 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
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_TRAIN_PLAN_DETAIL : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 年度培训计划ID
|
||||
/// </summary>
|
||||
[Description("年度培训计划ID")]
|
||||
[DataFieldForeignKey("Nav_Plan", "Nav_ListPlanDetail")]
|
||||
public Guid PLAN_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航: 年度培训计划
|
||||
/// </summary>
|
||||
[Description("导航: 年度培训计划")]
|
||||
public T_SE_TRAIN_PLAN Nav_Plan { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 年度培训计划明细 (公司为分解触发的明细 再此一对多细化 )
|
||||
/// </summary>
|
||||
[Description("年度培训计划明细")]
|
||||
public Guid? PLAN_DETAIL_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 培训月份 前端填写 给后台 DATE_TRAIN 赋值
|
||||
/// </summary>
|
||||
[Description("培训月份")]
|
||||
[DataFieldIngore]
|
||||
public int MONTH { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 培训时间 默认 1日0点
|
||||
/// </summary>
|
||||
[Description("培训时间")]
|
||||
[FormFieldEdit]
|
||||
public DateTime DATE_TRAIN { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 培训性质
|
||||
/// </summary>
|
||||
[Description("培训性质")]
|
||||
[FormFieldEdit]
|
||||
public TrainInOut IN_OUT { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 培训类型ID
|
||||
/// </summary>
|
||||
[Description("培训类型ID")]
|
||||
[FormFieldEdit]
|
||||
[DataFieldForeignKey("Nav_TrainTypeEnum")]
|
||||
public Guid? TYPE_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 导航: 培训类型
|
||||
/// </summary>
|
||||
[Description("导航: 培训类型")]
|
||||
public T_SE_TRAIN_TYPE_ENUM Nav_TrainTypeEnum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 培训名称
|
||||
/// </summary>
|
||||
[Description("培训名称")]
|
||||
[FormFieldEdit]
|
||||
[DataFieldLength(100)]
|
||||
public string NAME { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 培训对象
|
||||
/// </summary>
|
||||
[Description("培训对象")]
|
||||
[DataFieldLength(100)]
|
||||
[FormFieldEdit]
|
||||
public string OBJECT { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 培训形式 线上培训/线下培训 委外培训
|
||||
/// </summary>
|
||||
[Description("培训形式")]
|
||||
[FormFieldEdit]
|
||||
[EnumName("TrainType")]
|
||||
public TrainType TRAINTYPE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 考核方式 线上培训/线下培训 委外培训
|
||||
/// </summary>
|
||||
[Description("考核方式")]
|
||||
[FormFieldEdit]
|
||||
[EnumName("PlanCheckType")]
|
||||
public PlanCheckType CHECKTYPE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 培训学时
|
||||
/// </summary>
|
||||
[Description("培训学时")]
|
||||
[FormFieldEdit]
|
||||
public int CLASSHOUR { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 触发方式 直接培训 分解培训
|
||||
/// </summary>
|
||||
[Description("触发方式")]
|
||||
[FormFieldEdit]
|
||||
public SpringType SPRINTTYPE { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 全员参与(公司级才有可能是true)
|
||||
/// </summary>
|
||||
[Description("全员参与")]
|
||||
[FormFieldEdit]
|
||||
public bool ISALL { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 培训组织
|
||||
/// </summary>
|
||||
[Description("培训组织")]
|
||||
[FormFieldEdit]
|
||||
[DataFieldForeignKey("Nav_Department")]
|
||||
public Guid? DEPARTMENT_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 导航: 责任部门
|
||||
/// </summary>
|
||||
[Description("培训组织")]
|
||||
public T_FM_DEPARTMENT Nav_Department { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 被培训组织 多个,就按多个触发培训通知
|
||||
/// </summary>
|
||||
[Description("被培训组织")]
|
||||
public ICollection<T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT> Nav_ListDetailDepartment { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 状态
|
||||
/// 触发:默认0 单审批完成 10 触发了_20 审阅中_21_部分完成了 所有单子归档了_30
|
||||
/// 分解:部分完成分解了_21 分解完成就_30
|
||||
/// </summary>
|
||||
[Description("状态")]
|
||||
[EnumName("PFStandardStatus")]
|
||||
[FormFieldTable]
|
||||
[FormFieldEdit]
|
||||
[FormFieldQuery]
|
||||
public PFStandardStatus STATUS { get; set; }
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,41 @@
|
||||
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_TRAIN_PLAN_DETAIL_DEPARTMENT : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 年度培训计划ID
|
||||
/// </summary>
|
||||
[Description("年度培训计划ID")]
|
||||
[DataFieldForeignKey("Nav_PlanDetail", "Nav_ListDetailDepartment")]
|
||||
public Guid PLAN_DETAIL_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航: 年度培训计划
|
||||
/// </summary>
|
||||
[Description("导航: 年度培训计划")]
|
||||
public T_SE_TRAIN_PLAN_DETAIL Nav_PlanDetail { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 培训组织
|
||||
/// </summary>
|
||||
[Description("培训组织")]
|
||||
[FormFieldEdit]
|
||||
[DataFieldForeignKey("Nav_Department")]
|
||||
public Guid? DEPARTMENT_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航: 责任部门
|
||||
/// </summary>
|
||||
[Description("培训组织")]
|
||||
public T_FM_DEPARTMENT Nav_Department { get; set; }
|
||||
}
|
||||
}
|
||||
36
APT.MS.Domain/Entities/SC/SE/T_SE_TRAIN_PLAN_FILE.cs
Normal file
36
APT.MS.Domain/Entities/SC/SE/T_SE_TRAIN_PLAN_FILE.cs
Normal file
@ -0,0 +1,36 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.ComponentModel;
|
||||
namespace APT.MS.Domain.Entities.SE
|
||||
{
|
||||
/// <summary>
|
||||
/// 导航属性:年度培训计划附件
|
||||
/// </summary>
|
||||
[Description("年度培训计划附件")]
|
||||
public class T_SE_TRAIN_PLAN_FILE : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 年度培训计划ID
|
||||
/// </summary>
|
||||
[Description("年度培训计划ID")]
|
||||
[DataFieldForeignKey("Nav_Plan", "Nav_Files")]
|
||||
public Guid PLAN_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航属性:年度培训计划
|
||||
/// </summary>
|
||||
[Description("导航属性:年度培训计划")]
|
||||
public T_SE_TRAIN_PLAN Nav_Plan { get; set; }
|
||||
/// <summary>
|
||||
/// 文件ID
|
||||
/// </summary>
|
||||
[Description("文件")]
|
||||
[DataFieldForeignKey("Nav_ImgFile")]
|
||||
public Guid IMG_FILE_ID { get; set; }
|
||||
/// <summary>
|
||||
/// 导航属性:文件
|
||||
/// </summary>
|
||||
[Description("导航属性:文件")]
|
||||
public T_PF_IMG_FILE Nav_ImgFile { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,4 +1,6 @@
|
||||
namespace APT.MS.Domain.Enums
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Enums
|
||||
{
|
||||
/// <summary>试题类型</summary>
|
||||
public enum SETestTypeEnum
|
||||
@ -35,9 +37,9 @@
|
||||
汇总中 = 2,
|
||||
完成 = 3,
|
||||
}
|
||||
|
||||
|
||||
/// <summary>三级安全教育卡培训状态</summary>
|
||||
public enum SEThreeLevelSafeTrainStatus
|
||||
public enum SEThreeLevelSafeTrainStatus
|
||||
{
|
||||
草稿 = 0,
|
||||
公司培训 = 1,
|
||||
@ -65,27 +67,27 @@
|
||||
{
|
||||
不合格 = 0,
|
||||
合格 = 1,
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>培训组织部门类型</summary>
|
||||
public enum SEThreeLevelSafeTrainType
|
||||
public enum SEThreeLevelSafeTrainType
|
||||
{
|
||||
公司级 = 0,
|
||||
部门级 = 1,
|
||||
车间级 = 2,
|
||||
班组级 = 3,
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
/// <summary>培训效果评估结果</summary>
|
||||
public enum SEEvaluationResultEnum
|
||||
public enum SEEvaluationResultEnum
|
||||
{
|
||||
好 = 0,
|
||||
较好 = 1,
|
||||
一般 = 2,
|
||||
差 = 3,
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 部门培训计划触发方式
|
||||
@ -108,7 +110,7 @@
|
||||
归档 = 4,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// <summary>
|
||||
/// 培训是否枚举
|
||||
/// </summary>
|
||||
public enum SETrainYesNoEnum
|
||||
@ -116,7 +118,7 @@
|
||||
未签到 = 0,
|
||||
参加 = 1,
|
||||
请假 = 2,
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
@ -128,16 +130,18 @@
|
||||
否 = 0,
|
||||
是 = 1,
|
||||
}
|
||||
|
||||
|
||||
public enum SETrainRecordStatus {
|
||||
|
||||
public enum SETrainRecordStatus
|
||||
{
|
||||
草稿 = 0,
|
||||
签到中 = 1,
|
||||
审阅中 = 2,
|
||||
归档 = 3,
|
||||
}
|
||||
|
||||
public enum SETrainningEffectSurveyStatus {
|
||||
public enum SETrainningEffectSurveyStatus
|
||||
{
|
||||
草稿 = 0,
|
||||
归档 = 1,
|
||||
}
|
||||
@ -154,4 +158,105 @@
|
||||
请假 = 1,
|
||||
缺席 = 2,
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 培训类型
|
||||
/// </summary>
|
||||
public enum PlanType
|
||||
{
|
||||
/// <summary>
|
||||
/// 公司 5
|
||||
/// </summary>
|
||||
[Description("公司")]
|
||||
Company = 5,
|
||||
|
||||
/// <summary>
|
||||
/// 部门 10
|
||||
/// </summary>
|
||||
[Description("部门")]
|
||||
Department = 10
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 培训性质 内部培训 5 外部培训 10
|
||||
/// </summary>
|
||||
public enum TrainInOut
|
||||
{
|
||||
/// <summary>
|
||||
/// 内部培训 5
|
||||
/// </summary>
|
||||
[Description("内部培训")]
|
||||
In = 5,
|
||||
|
||||
/// <summary>
|
||||
/// 外部培训 10
|
||||
/// </summary>
|
||||
[Description("外部培训")]
|
||||
Out = 8
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 培训形式 内部培训 5 外部培训 10
|
||||
/// </summary>
|
||||
public enum TrainType
|
||||
{
|
||||
/// <summary>
|
||||
/// 线上培训 50
|
||||
/// </summary>
|
||||
[Description("线上培训")]
|
||||
InOnLine = 50,
|
||||
/// <summary>
|
||||
/// 线下培训 55
|
||||
/// </summary>
|
||||
[Description("线下培训")]
|
||||
InOffLine = 55,
|
||||
|
||||
/// <summary>
|
||||
/// 委外培训 80
|
||||
/// </summary>
|
||||
[Description("委外培训")]
|
||||
Out = 80
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 考核方式 线上考核 51 线下考核 56 委外考核 81
|
||||
/// </summary>
|
||||
public enum PlanCheckType
|
||||
{
|
||||
/// <summary>
|
||||
/// 线上考核 51
|
||||
/// </summary>
|
||||
[Description("线上考核")]
|
||||
InOnLine = 51,
|
||||
/// <summary>
|
||||
/// 线下考核 56
|
||||
/// </summary>
|
||||
[Description("线下考核")]
|
||||
InOffLine = 56,
|
||||
|
||||
/// <summary>
|
||||
/// 委外考核 81
|
||||
/// </summary>
|
||||
[Description("委外考核")]
|
||||
Out = 81
|
||||
}
|
||||
/// <summary>
|
||||
/// 触发方式
|
||||
/// </summary>
|
||||
public enum SpringType
|
||||
{
|
||||
/// <summary>
|
||||
/// 直接触发 5
|
||||
/// </summary>
|
||||
[Description("直接触发")]
|
||||
Spring = 5,
|
||||
|
||||
/// <summary>
|
||||
/// 拆分触发 10
|
||||
/// </summary>
|
||||
[Description("拆分触发")]
|
||||
Split = 10,
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -1,137 +1,128 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// T4模板文件:基础接口类
|
||||
// 此代码由T4模板自动生成
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//------------------------------------------------------------------------------
|
||||
using APT.Infrastructure.Core;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using APT.Utility;
|
||||
using APT.Infrastructure.Api;
|
||||
using APT.BaseData.Domain.ApiModel.PF;
|
||||
namespace APT.LG.WebApi.Controllers.Api
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// T4模板文件:基础接口类
|
||||
// 此代码由T4模板自动生成
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//------------------------------------------------------------------------------
|
||||
using APT.Infrastructure.Core;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using APT.Utility;
|
||||
using APT.Infrastructure.Api;
|
||||
using APT.BaseData.Domain.ApiModel.PF;
|
||||
namespace APT.LG.WebApi.Controllers.Api
|
||||
{
|
||||
using APT.BaseData.Domain.Entities.LG;
|
||||
|
||||
#region Oprate-表单操作日志表
|
||||
/// <summary>
|
||||
/// 表单操作日志表
|
||||
/// </summary>
|
||||
[Route("api/LG/Oprate")]
|
||||
public partial class OprateController : AuthorizeApiController<T_LG_OPRATE>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_LG_OPRATE>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_LG_OPRATE>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_LG_OPRATE> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_LG_OPRATE> 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_LG_OPRATE entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_LG_OPRATE> 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_LG_OPRATE> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
#region Oprate-表单操作日志表
|
||||
/// <summary>
|
||||
/// 表单操作日志表
|
||||
/// </summary>
|
||||
[Route("api/LG/Oprate")]
|
||||
public partial class OprateController : AuthorizeApiController<T_LG_OPRATE>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_LG_OPRATE>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_LG_OPRATE>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_LG_OPRATE> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_LG_OPRATE> 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_LG_OPRATE entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_LG_OPRATE> 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_LG_OPRATE> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
@ -1,370 +1,356 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// T4模板文件:基础接口类
|
||||
// 此代码由T4模板自动生成
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//------------------------------------------------------------------------------
|
||||
using APT.Infrastructure.Core;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using APT.Utility;
|
||||
using APT.Infrastructure.Api;
|
||||
using APT.BaseData.Domain.ApiModel.PF;
|
||||
namespace APT.NW.WebApi.Controllers.Api
|
||||
{
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// T4模板文件:基础接口类
|
||||
// 此代码由T4模板自动生成
|
||||
// 对此文件的更改可能会导致不正确的行为,并且如果重新生成代码,这些更改将会丢失。
|
||||
//------------------------------------------------------------------------------
|
||||
using APT.Infrastructure.Core;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Collections.Generic;
|
||||
using APT.Utility;
|
||||
using APT.Infrastructure.Api;
|
||||
using APT.BaseData.Domain.ApiModel.PF;
|
||||
namespace APT.NW.WebApi.Controllers.Api
|
||||
{
|
||||
using APT.BaseData.Domain.Entities.NW;
|
||||
|
||||
#region Enterprise-子企业表
|
||||
/// <summary>
|
||||
/// 子企业表
|
||||
/// </summary>
|
||||
[Route("api/NW/Enterprise")]
|
||||
public partial class EnterpriseController : AuthorizeTreeApiController<T_NW_ENTERPRISE>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ENTERPRISE>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ENTERPRISE>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_NW_ENTERPRISE> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_NW_ENTERPRISE> 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_NW_ENTERPRISE entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ENTERPRISE> 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_NW_ENTERPRISE> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 获得树形实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("TreeData")]
|
||||
public JsonActionResult<IEnumerable<TreeNode<T_NW_ENTERPRISE>>> TreeData([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitTreeOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region RoleDataPerm-子企业数据权限表
|
||||
/// <summary>
|
||||
/// 子企业数据权限表
|
||||
/// </summary>
|
||||
[Route("api/NW/RoleDataPerm")]
|
||||
public partial class RoleDataPermController : AuthorizeApiController<T_NW_ROLE_DATA_PERM>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_DATA_PERM>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_DATA_PERM>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_NW_ROLE_DATA_PERM> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_NW_ROLE_DATA_PERM> 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_NW_ROLE_DATA_PERM entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ROLE_DATA_PERM> 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_NW_ROLE_DATA_PERM> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
#region RoleMenu-子企业权限表
|
||||
/// <summary>
|
||||
/// 子企业权限表
|
||||
/// </summary>
|
||||
[Route("api/NW/RoleMenu")]
|
||||
public partial class RoleMenuController : AuthorizeApiController<T_NW_ROLE_MENU>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_MENU>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_MENU>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_NW_ROLE_MENU> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_NW_ROLE_MENU> 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_NW_ROLE_MENU entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ROLE_MENU> 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_NW_ROLE_MENU> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
#endregion
|
||||
|
||||
}
|
||||
#region Enterprise-子企业表
|
||||
/// <summary>
|
||||
/// 子企业表
|
||||
/// </summary>
|
||||
[Route("api/NW/Enterprise")]
|
||||
public partial class EnterpriseController : AuthorizeTreeApiController<T_NW_ENTERPRISE>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ENTERPRISE>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ENTERPRISE>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_NW_ENTERPRISE> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_NW_ENTERPRISE> 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_NW_ENTERPRISE entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ENTERPRISE> 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_NW_ENTERPRISE> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
/// <summary>
|
||||
/// 获得树形实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("TreeData")]
|
||||
public JsonActionResult<IEnumerable<TreeNode<T_NW_ENTERPRISE>>> TreeData([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitTreeOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
#region RoleDataPerm-子企业数据权限表
|
||||
/// <summary>
|
||||
/// 子企业数据权限表
|
||||
/// </summary>
|
||||
[Route("api/NW/RoleDataPerm")]
|
||||
public partial class RoleDataPermController : AuthorizeApiController<T_NW_ROLE_DATA_PERM>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_DATA_PERM>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_DATA_PERM>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_NW_ROLE_DATA_PERM> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_NW_ROLE_DATA_PERM> 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_NW_ROLE_DATA_PERM entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ROLE_DATA_PERM> 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_NW_ROLE_DATA_PERM> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
#region RoleMenu-子企业权限表
|
||||
/// <summary>
|
||||
/// 子企业权限表
|
||||
/// </summary>
|
||||
[Route("api/NW/RoleMenu")]
|
||||
public partial class RoleMenuController : AuthorizeApiController<T_NW_ROLE_MENU>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_MENU>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_NW_ROLE_MENU>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_NW_ROLE_MENU> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_NW_ROLE_MENU> 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_NW_ROLE_MENU entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_NW_ROLE_MENU> 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_NW_ROLE_MENU> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
}
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -61,28 +61,43 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
{
|
||||
try
|
||||
{
|
||||
DateTime dtNow = DateTime.Now;
|
||||
var Parameter1 = filter.Parameter1;
|
||||
if (!string.IsNullOrEmpty(filter.Parameter1))
|
||||
{
|
||||
try
|
||||
{
|
||||
//接收来自页面的参数
|
||||
DateTime deParm = Convert.ToDateTime(filter.Parameter1);
|
||||
dtNow = deParm;
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
|
||||
#region SE安全教育培训
|
||||
|
||||
var config = GetEntity<T_SE_SECONFIG>(t => true, new BaseFilter(filter.GetOrgId()));
|
||||
//触发安全意识调查
|
||||
CheckCreateSafeSurvey(filter);
|
||||
CheckCreateSafeSurvey(filter, dtNow, config);
|
||||
//安全意识调查结束三天前提醒未答卷的人
|
||||
CheckSafeSuveyNotAnswered(filter);
|
||||
CheckSafeSuveyNotAnswered(filter, dtNow);
|
||||
//培训需求调查
|
||||
CheckCreateTrainSurvey(filter);
|
||||
CheckCreateTrainSurvey(filter, dtNow, config);
|
||||
|
||||
//部门培训计划
|
||||
CheckDepTrainPlan(filter);
|
||||
CheckDepTrainPlan(filter, dtNow, config);
|
||||
//到时间触发年度培训计划,搜集完成的部门培训计划
|
||||
FinishYearTrainPlan(filter);
|
||||
FinishYearTrainPlan(filter, dtNow, config);
|
||||
//培训通知
|
||||
CheckYearTrainPlan(filter);
|
||||
CheckYearTrainPlan(filter, dtNow);
|
||||
//换证培训触发
|
||||
CreateRenewalTrain(filter);
|
||||
CreateRenewalTrain(filter, dtNow);
|
||||
#endregion
|
||||
#region LR法律法规
|
||||
//触发需求识别
|
||||
NoticeStartDemandDistinguish(filter);
|
||||
NoticeStartDemandDistinguish(filter, dtNow);
|
||||
//通知安环部负责人安全生产法律法规更新与融入
|
||||
NoticeLRLawIntegrateUpdate(filter);
|
||||
NoticeLRLawIntegrateUpdate(filter, dtNow);
|
||||
#endregion
|
||||
}
|
||||
catch (Exception ex)
|
||||
@ -388,12 +403,12 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
return str;
|
||||
}
|
||||
//触发换证培训通知
|
||||
private void CreateRenewalTrain(KeywordFilter filter)
|
||||
private void CreateRenewalTrain(KeywordFilter filter, DateTime dtNow)
|
||||
{
|
||||
var baseFilter = new BaseFilter(filter.GetOrgId());
|
||||
baseFilter.Include = new string[] { "Nav_User" };
|
||||
DateTime dtMonth3Later = DateTime.Now.Date.AddMonths(3);
|
||||
DateTime dtNow1DayLater = DateTime.Now.Date.AddDays(1);
|
||||
DateTime dtMonth3Later = dtNow.Date.AddMonths(3);
|
||||
DateTime dtNow1DayLater = dtNow.Date.AddDays(1);
|
||||
|
||||
var allTrain = GetEntities<T_SE_RENEWAL_TRAIN>(t => t.IS_DELETED == false && t.Nav_User.ENABLE_STATUS == 0 && (t.REVIEW_DATE == dtMonth3Later || t.EXPIRY_DATE == dtMonth3Later || t.EXPIRY_DATE == dtNow1DayLater), baseFilter);//wyw 加限制
|
||||
var overTime = allTrain.Where(t => t.REVIEW_DATE == dtMonth3Later || t.EXPIRY_DATE == dtMonth3Later);//wyw 到期 或 到复审日期 提前3个月做提醒
|
||||
@ -450,7 +465,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
/// <param name="filter"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("NoticeStartDemandDistinguish")]
|
||||
public JsonActionResult<bool> NoticeStartDemandDistinguish([FromBody] KeywordFilter filter)
|
||||
public JsonActionResult<bool> NoticeStartDemandDistinguish(KeywordFilter filter, DateTime dtNow)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
@ -458,20 +473,20 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
{
|
||||
List<T_LR_DEMAND_DISTINGUISH> demandDistinguishes = new List<T_LR_DEMAND_DISTINGUISH>();
|
||||
List<T_FM_NOTIFICATION_TASK> sendNotices = new List<T_FM_NOTIFICATION_TASK>();
|
||||
DateTime nowTime = DateTime.Now;
|
||||
//DateTime nowTime = DateTime.Now;
|
||||
BaseFilter baseFilter = new BaseFilter(filter.GetOrgId());
|
||||
var config = GetEntity<T_LR_LRCONFIG>(t => t.IS_DELETED == false);
|
||||
var isRun = false;
|
||||
if (config != null)
|
||||
{
|
||||
if (config.ENABLE_STATUS == 0 && config.DEMAND_START_TIME.Month == nowTime.Month && config.DEMAND_START_TIME.Day == nowTime.Day)
|
||||
if (config.ENABLE_STATUS == 0 && config.DEMAND_START_TIME.Month == dtNow.Month && config.DEMAND_START_TIME.Day == dtNow.Day)
|
||||
{
|
||||
isRun = true;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (nowTime.Month == 12 && nowTime.Day == 1)
|
||||
if (dtNow.Month == 12 && dtNow.Day == 1)
|
||||
{
|
||||
isRun = true;
|
||||
}
|
||||
@ -484,7 +499,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
var allSendUserIds = new List<Guid>();
|
||||
var allSendUserNames = new List<string>();
|
||||
var endTime = config.DEMAND_END_TIME;
|
||||
endTime = new DateTime(nowTime.Year, endTime.Month, endTime.Day, 23, 59, 59);
|
||||
endTime = new DateTime(dtNow.Year, endTime.Month, endTime.Day, 23, 59, 59);
|
||||
if (entity == null)
|
||||
{
|
||||
var users = GetEntities<T_FM_USER>(t => t.ENABLE_STATUS == 0 && !t.CODE.Contains("admin"), baseFilter);
|
||||
@ -881,7 +896,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
/// <param name="filter"></param>
|
||||
/// <returns></returns>
|
||||
[HttpGet, Route("NoticeLRLawIntegrateUpdate")]
|
||||
public JsonActionResult<bool> NoticeLRLawIntegrateUpdate([FromBody] KeywordFilter filter)
|
||||
public JsonActionResult<bool> NoticeLRLawIntegrateUpdate(KeywordFilter filter, DateTime dtNow)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
@ -891,7 +906,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
T_LR_LAW_INTEGRATE_UPDATE lawIntegrateUpdate = null;
|
||||
List<T_LR_LAW_INTEGRATE_UPDATE_DETAIL> integrateUpdateDetails = new List<T_LR_LAW_INTEGRATE_UPDATE_DETAIL>();
|
||||
T_FM_NOTIFICATION_TASK sendNotice = null;
|
||||
DateTime nowTime = DateTime.Now;
|
||||
//DateTime nowTime = DateTime.Now;
|
||||
BaseFilter baseFilter = new BaseFilter(filter.GetOrgId());
|
||||
var config = GetEntities<T_LR_INTEGRATE_UPDATE_TIME>(t => t.IS_DELETED == false, baseFilter);
|
||||
if (config != null && config.Any())
|
||||
@ -899,7 +914,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
bool isTime = false;
|
||||
config.ForEach(t =>
|
||||
{
|
||||
if (t.INTEGRATE_UPDATE_TIME.Month == nowTime.Month && t.INTEGRATE_UPDATE_TIME.Day == nowTime.Day)
|
||||
if (t.INTEGRATE_UPDATE_TIME.Month == dtNow.Month && t.INTEGRATE_UPDATE_TIME.Day == dtNow.Day)
|
||||
{
|
||||
isTime = true;
|
||||
}
|
||||
@ -908,7 +923,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
{
|
||||
lawIntegrateUpdate = new T_LR_LAW_INTEGRATE_UPDATE();
|
||||
lawIntegrateUpdate.ID = Guid.NewGuid();
|
||||
lawIntegrateUpdate.YEAR = nowTime;
|
||||
lawIntegrateUpdate.YEAR = dtNow;
|
||||
lawIntegrateUpdate.ORG_ID = filter.GetOrgId();
|
||||
lawIntegrateUpdate.RATE = "0";
|
||||
var laws = GetEntities<T_LR_LAW>(t => t.LAW_STATUS == BSLawStatusEnum.现行, baseFilter, new string[] { "Nav_LawVersion", "Nav_LawSCSystem" }).ToList();
|
||||
@ -970,10 +985,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
/// 触发安全意识调查
|
||||
/// </summary>
|
||||
/// <param name="filter"></param>
|
||||
private void CheckCreateSafeSurvey([FromBody] KeywordFilter filter)
|
||||
private void CheckCreateSafeSurvey(KeywordFilter filter, DateTime dtNow, T_SE_SECONFIG config)
|
||||
{
|
||||
var config = GetEntity<T_SE_SECONFIG>(t => true);
|
||||
var dt = DateTime.Now;
|
||||
var mm = 12;
|
||||
var dd = 1;
|
||||
if (config != null && config.SAFE_SERVEY_TRIGGER_TIME != null)
|
||||
@ -981,12 +994,12 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
mm = config.SAFE_SERVEY_TRIGGER_TIME.Value.Month;
|
||||
dd = config.SAFE_SERVEY_TRIGGER_TIME.Value.Day;
|
||||
}
|
||||
if (!(mm == dt.Month && dd == dt.Day))
|
||||
if (!(mm == dtNow.Month && dd == dtNow.Day))
|
||||
return;
|
||||
var data = GetEntity<T_SE_SAFE_SURVEY>(t => t.LAUNCH_TIME != null &&
|
||||
t.LAUNCH_TIME.Value.Year == dt.Year &&
|
||||
t.LAUNCH_TIME.Value.Month == dt.Month &&
|
||||
t.LAUNCH_TIME.Value.Day == dt.Day);
|
||||
t.LAUNCH_TIME.Value.Year == dtNow.Year &&
|
||||
t.LAUNCH_TIME.Value.Month == dtNow.Month &&
|
||||
t.LAUNCH_TIME.Value.Day == dtNow.Day);
|
||||
if (data != null)
|
||||
{
|
||||
return;
|
||||
@ -1058,12 +1071,12 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
BantchAddEntityNoCommit(safeSurveyDeps);
|
||||
});
|
||||
}
|
||||
private void CheckSafeSuveyNotAnswered([FromBody] KeywordFilter filter)
|
||||
private void CheckSafeSuveyNotAnswered(KeywordFilter filter, DateTime dtNow)
|
||||
{
|
||||
//截止日前前3天未完成推送今日提醒给该员工本人
|
||||
var dt = DateTime.Now;
|
||||
var lasttime = dt.AddDays(3);
|
||||
var surveys = GetEntities<T_SE_SAFE_SURVEY>(t => t.LAUNCH_TIME.Value.Year == dt.Year && t.STATUS == SESafeSurveyStatus.调查中 && t.END_TIME.Value <= lasttime && dt < t.END_TIME.Value,
|
||||
//var dt = DateTime.Now;
|
||||
var lasttime = dtNow.AddDays(3);
|
||||
var surveys = GetEntities<T_SE_SAFE_SURVEY>(t => t.LAUNCH_TIME.Value.Year == dtNow.Year && t.STATUS == SESafeSurveyStatus.调查中 && t.END_TIME.Value <= lasttime && dtNow < t.END_TIME.Value,
|
||||
new BaseFilter(filter.GetOrgId()), new string[] { "Nav_Papers.Nav_User" }).ToList();
|
||||
if (surveys == null || surveys.Count == 0)
|
||||
{
|
||||
@ -1105,10 +1118,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
/// <summary>
|
||||
/// 触发培训需求调查
|
||||
/// </summary>
|
||||
private void CheckCreateTrainSurvey([FromBody] KeywordFilter filter)
|
||||
private void CheckCreateTrainSurvey(KeywordFilter filter, DateTime dtNow, T_SE_SECONFIG config)
|
||||
{
|
||||
var config = GetEntity<T_SE_SECONFIG>(t => true);
|
||||
var dt = DateTime.Now;
|
||||
var mm = 12;
|
||||
var dd = 1;
|
||||
if (config != null && config.TRAIN_SURVEY_TRIGGER_TIME != null)
|
||||
@ -1116,14 +1127,14 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
mm = config.TRAIN_SURVEY_TRIGGER_TIME.Value.Month;
|
||||
dd = config.TRAIN_SURVEY_TRIGGER_TIME.Value.Day;
|
||||
}
|
||||
if (!(mm == dt.Month && dd == dt.Day))
|
||||
if (!(mm == dtNow.Month && dd == dtNow.Day))
|
||||
{
|
||||
return;
|
||||
}
|
||||
var data = GetEntity<T_SE_TRAIN_SURVEY>(t => t.LAUNCH_TIME != null &&
|
||||
t.LAUNCH_TIME.Value.Year == dt.Year &&
|
||||
t.LAUNCH_TIME.Value.Month == dt.Month &&
|
||||
t.LAUNCH_TIME.Value.Day == dt.Day);
|
||||
t.LAUNCH_TIME.Value.Year == dtNow.Year &&
|
||||
t.LAUNCH_TIME.Value.Month == dtNow.Month &&
|
||||
t.LAUNCH_TIME.Value.Day == dtNow.Day);
|
||||
if (data != null)
|
||||
{
|
||||
return;
|
||||
@ -1336,12 +1347,10 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
return true;
|
||||
});
|
||||
}
|
||||
private JsonActionResult<bool> FinishYearTrainPlan([FromBody] KeywordFilter filter)
|
||||
private JsonActionResult<bool> FinishYearTrainPlan(KeywordFilter filter, DateTime dtNow, T_SE_SECONFIG config)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
var config = GetEntity<T_SE_SECONFIG>(t => true);
|
||||
var dt = DateTime.Now;
|
||||
var mm = 12;
|
||||
var dd = 1;
|
||||
if (config != null && config.TRAIN_SURVEY_TRIGGER_TIME != null)
|
||||
@ -1349,11 +1358,11 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
mm = config.DEP_TRAIN_PLAN_END_TIME.Value.Month;
|
||||
dd = config.DEP_TRAIN_PLAN_END_TIME.Value.Day;
|
||||
}
|
||||
if (!(mm == dt.Month && dd == dt.Day))
|
||||
if (!(mm == dtNow.Month && dd == dtNow.Day))
|
||||
{
|
||||
return true;
|
||||
}
|
||||
var finishYearPlan = GetEntity<T_SE_YEAR_TRAIN_PLAN>(t => t.PLAN_YEAR == dt.Year && t.STATUS == PFStandardStatus.Draft);
|
||||
var finishYearPlan = GetEntity<T_SE_YEAR_TRAIN_PLAN>(t => t.PLAN_YEAR == dtNow.Year && t.STATUS == PFStandardStatus.Draft);
|
||||
|
||||
if (finishYearPlan == null)
|
||||
{
|
||||
@ -1361,7 +1370,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
{
|
||||
ID = Guid.NewGuid(),
|
||||
ORG_ID = filter.GetOrgId(),
|
||||
PLAN_YEAR = dt.Year,
|
||||
PLAN_YEAR = dtNow.Year,
|
||||
END_TIME = Convert.ToDateTime(DateTime.Now.ToString("D").ToString()),
|
||||
};
|
||||
}
|
||||
@ -1393,16 +1402,26 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
return true;
|
||||
});
|
||||
}
|
||||
public void CheckYearTrainPlan([FromBody] KeywordFilter filter)
|
||||
public void CheckYearTrainPlan(KeywordFilter filter, DateTime dtNow)
|
||||
{
|
||||
|
||||
// select top 100 * from T_SE_DEP_TRAIN_PLAN order by CREATE_TIME desc
|
||||
//select top 100 * from T_SE_DEP_TRAIN_PLAN_DETAIL where DEP_TRAIN_PLAN_ID in ('AC8AAFBB-67FA-FB92-F522-89D7697F1C68', '65511754-9515-6320-30FB-17768F095635') order by MOON desc
|
||||
|
||||
|
||||
//select top 100 * from T_SE_YEAR_TRAIN_PLAN order by CREATE_TIME desc
|
||||
//select top 100 * from T_SE_YEAR_TRAIN_PLAN_DETAIL where YEAR_TRAIN_PLAN_ID in ('BF736F5B-7FB8-4A8F-8511-957F0D5CC585') order by MOON desc
|
||||
|
||||
|
||||
|
||||
//培训月份1日倒退7天触发待办给责任人制定培训通知
|
||||
var dt = DateTime.Now;
|
||||
if (filter.Parameter1 != null)
|
||||
{
|
||||
dt = DateTime.Parse(filter.Parameter1);
|
||||
}
|
||||
var tmpDate = dt;
|
||||
var planNoticeData = GetEntities<T_SE_YEAR_TRAIN_PLAN_DETAIL>(t => t.Nav_YearTrainPlan.STATUS == PFStandardStatus.Archived && t.Nav_YearTrainPlan.PLAN_YEAR == dt.Year && t.MOON == tmpDate.Month && 1 == tmpDate.Day && t.SEND == 0 && t.RESPONSIBILITY_USER_ID != null, new BaseFilter(filter.GetOrgId()),
|
||||
//var dt = DateTime.Now;
|
||||
//if (filter.Parameter1 != null)
|
||||
//{
|
||||
// dt = DateTime.Parse(filter.Parameter1);
|
||||
//}
|
||||
var tmpDate = dtNow;
|
||||
var planNoticeData = GetEntities<T_SE_YEAR_TRAIN_PLAN_DETAIL>(t => t.Nav_YearTrainPlan.STATUS == PFStandardStatus.Archived && t.Nav_YearTrainPlan.PLAN_YEAR == dtNow.Year && t.MOON == tmpDate.Month && 1 == tmpDate.Day && t.SEND == 0 && t.RESPONSIBILITY_USER_ID != null, new BaseFilter(filter.GetOrgId()),
|
||||
new string[] { "Nav_YearTrainPlan", "Nav_ResponsibilityUser", "Nav_YearTrainPlanContent" });
|
||||
List<T_SE_TRAIN_NOTIFY> trainNotifys = new List<T_SE_TRAIN_NOTIFY>();
|
||||
List<T_SE_TRAIN_NOTIFY_CONTENT_REL> trainNotifyContents = new List<T_SE_TRAIN_NOTIFY_CONTENT_REL>();
|
||||
@ -1424,7 +1443,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
|
||||
|
||||
trainNotify.ID = Guid.NewGuid();
|
||||
trainNotify.LAUNCH_TIME = dt;
|
||||
trainNotify.LAUNCH_TIME = dtNow;
|
||||
if (plan.Nav_ResponsibilityUser != null)
|
||||
{
|
||||
trainNotify.LAUNCH_DEPARTMENT_ID = plan.Nav_ResponsibilityUser.DEPARTMENT_ID;
|
||||
@ -1477,25 +1496,23 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
BantchAddEntityNoCommit(trainNotifyContents);
|
||||
});
|
||||
}
|
||||
public void CheckDepTrainPlan([FromBody] KeywordFilter filter)
|
||||
public void CheckDepTrainPlan(KeywordFilter filter, DateTime dtNow, T_SE_SECONFIG config)
|
||||
{
|
||||
//检查配置是否存在,并验证是否在同一天
|
||||
var dt = DateTime.Now;
|
||||
DateTime startTime = new DateTime(dt.Year, 1, 1);
|
||||
DateTime endTime = new DateTime(dt.Year, 1, 15);
|
||||
DateTime startTime = new DateTime(dtNow.Year, 1, 1);
|
||||
DateTime endTime = new DateTime(dtNow.Year, 1, 15);
|
||||
var mm = 12;
|
||||
var dd = 1;
|
||||
var config = GetEntity<T_SE_SECONFIG>(t => true, new BaseFilter(filter.GetOrgId()));
|
||||
if (config != null)
|
||||
{
|
||||
if (config.DEP_TRAIN_PLAN_START_TIME != null)
|
||||
{
|
||||
startTime = new DateTime(dt.Year, config.DEP_TRAIN_PLAN_START_TIME.Value.Month, config.DEP_TRAIN_PLAN_START_TIME.Value.Day);
|
||||
startTime = new DateTime(dtNow.Year, config.DEP_TRAIN_PLAN_START_TIME.Value.Month, config.DEP_TRAIN_PLAN_START_TIME.Value.Day);
|
||||
mm = startTime.Month;
|
||||
dd = startTime.Day;
|
||||
if (config.DEP_TRAIN_PLAN_END_TIME != null)
|
||||
{
|
||||
endTime = new DateTime(dt.Year, config.DEP_TRAIN_PLAN_END_TIME.Value.Month, config.DEP_TRAIN_PLAN_END_TIME.Value.Day);
|
||||
endTime = new DateTime(dtNow.Year, config.DEP_TRAIN_PLAN_END_TIME.Value.Month, config.DEP_TRAIN_PLAN_END_TIME.Value.Day);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -1503,9 +1520,9 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!(mm == dt.Month && dd == dt.Day))
|
||||
if (!(mm == dtNow.Month && dd == dtNow.Day))
|
||||
return;
|
||||
var existList = GetEntity<T_SE_DEP_TRAIN_PLAN>(t => t.PLAN_YEAR == dt.Year &&
|
||||
var existList = GetEntity<T_SE_DEP_TRAIN_PLAN>(t => t.PLAN_YEAR == dtNow.Year &&
|
||||
t.LAUNCH_TIME != null &&
|
||||
t.LAUNCH_TIME.Value.Month == startTime.Month &&
|
||||
t.LAUNCH_TIME.Value.Day == startTime.Day,
|
||||
@ -1541,8 +1558,8 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
T_SE_DEP_TRAIN_PLAN record = new T_SE_DEP_TRAIN_PLAN
|
||||
{
|
||||
ID = planId,
|
||||
PLAN_YEAR = dt.Year,
|
||||
LAUNCH_TIME = dt,
|
||||
PLAN_YEAR = dtNow.Year,
|
||||
LAUNCH_TIME = dtNow,
|
||||
LAUNCH_DEPARTMENT_ID = dep.Nav_Department.ID,
|
||||
TRIGGER_TYPE = SEDepTrainPlanTriggerType.任务触发,
|
||||
STATUS = PFStandardStatus.Draft,
|
||||
|
||||
@ -1,13 +1,7 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// T4模板文件:基础接口类
|
||||
// 此代码由T4模板自动生成
|
||||
@ -21,5 +15,4 @@ using APT.Infrastructure.Api;
|
||||
using APT.BaseData.Domain.ApiModel.PF;
|
||||
namespace APT.PP.WebApi.Controllers.Api
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -27,12 +27,16 @@ 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;
|
||||
entity.DEP_TRAIN_PLAN_END_TIME= DateTime.Parse(entity.DEP_TRAIN_PLAN_END_TIME.Value.ToShortDateString()+" 23:59:59");
|
||||
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;
|
||||
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分!");
|
||||
}
|
||||
if (entity.ORG_ID == null && APT.Infrastructure.Api.AppContext.CurrentSession.OrgId.HasValue)
|
||||
{
|
||||
entity.ORG_ID = APT.Infrastructure.Api.AppContext.CurrentSession.OrgId;
|
||||
}
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
UpdateEntityNoCommit(entity);
|
||||
|
||||
@ -0,0 +1,291 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.SE;
|
||||
using APT.Utility;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using NPOI.HSSF.Util;
|
||||
using NPOI.SS.UserModel;
|
||||
using NPOI.XSSF.UserModel;
|
||||
using System.IO;
|
||||
using APT.Infrastructure.Api;
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using System.Linq.Expressions;
|
||||
using APT.BaseData.Domain.IServices;
|
||||
using APT.BaseData.Domain.IServices.FM;
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.MS.Domain.Enums;
|
||||
|
||||
namespace APT.SC.WebApi.Controllers.Api.SE
|
||||
{
|
||||
[Route("api/SE/SETrainPlan")]
|
||||
public class SETrainPlanController : AuthorizeApiController<T_SE_TRAIN_PLAN>
|
||||
{
|
||||
IFMNotificationTaskService NotificationTaskService { get; set; }
|
||||
//IFMDepartmentService DepartmentService { get; set; }
|
||||
//IPFSysLogService SysLogService { get; set; }
|
||||
//IFMUserService UserService { get; set; }
|
||||
IFMFlowPermitService MFlowPermitService { get; set; }
|
||||
//IPFCodeRuleService CodeRuleService { get; set; }
|
||||
IPFApproveCallBackService ApproveCallBackService { get; set; }
|
||||
//IBSOperateLogService OperateLogService { get; set; }
|
||||
public SETrainPlanController(IPFApproveCallBackService approveCallBackService, IFMFlowPermitService mFlowPermitService, IFMNotificationTaskService notificationTaskService)
|
||||
{
|
||||
NotificationTaskService = notificationTaskService;
|
||||
//DepartmentService = departmentService;
|
||||
//SysLogService = sysLogService;
|
||||
//UserService = userService;
|
||||
//IBSOperateLogService operateLogService,
|
||||
|
||||
MFlowPermitService = mFlowPermitService;
|
||||
//CodeRuleService = codeRuleService;
|
||||
ApproveCallBackService = approveCallBackService;
|
||||
//OperateLogService = operateLogService;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 保存
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("FullUpdate")]
|
||||
public JsonActionResult<bool> FullUpdate([FromBody] T_SE_TRAIN_PLAN entity)
|
||||
{
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
var Files = entity.Nav_Files;
|
||||
entity.Nav_Files = null;
|
||||
var ListPlanDetail = entity.Nav_ListPlanDetail;
|
||||
entity.Nav_ListPlanDetail = null;
|
||||
List<T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT> ListDetailDepartment = new List<T_SE_TRAIN_PLAN_DETAIL_DEPARTMENT>();
|
||||
Expression<Func<T_SE_TRAIN_PLAN, bool>> expression = e => e.ID != entity.ID && e.YEAR == entity.YEAR && !e.IS_DELETED;
|
||||
if (entity.TYPE == MS.Domain.Enums.PlanType.Company)
|
||||
{
|
||||
expression = expression.And(e => e.TYPE == entity.TYPE);
|
||||
}
|
||||
else
|
||||
{
|
||||
expression = expression.And(e => e.DEPARTMENT_ID == APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID);
|
||||
}
|
||||
var check = GetEntity(expression);
|
||||
if (check != null)
|
||||
{
|
||||
throw new Exception("您所在层级/组织当年度已经制定过培训计划,请勿多次提交!");
|
||||
}
|
||||
if (ListPlanDetail != null && ListPlanDetail.Count() > 0)
|
||||
{
|
||||
foreach (var item in ListPlanDetail)
|
||||
{
|
||||
item.DATE_TRAIN = Convert.ToDateTime(entity.YEAR + "-" + item.MONTH + "-01 00:00:00");
|
||||
}
|
||||
}
|
||||
if (ListPlanDetail != null && ListPlanDetail.Count() > 0)
|
||||
{
|
||||
foreach (var item in ListPlanDetail)
|
||||
{
|
||||
if (item.Nav_ListDetailDepartment != null && item.Nav_ListDetailDepartment.Count() > 0)
|
||||
{
|
||||
ListDetailDepartment.AddRange(item.Nav_ListDetailDepartment.ToList());
|
||||
item.Nav_ListDetailDepartment = null;
|
||||
}
|
||||
item.Nav_ListDetailDepartment = null;
|
||||
item.Nav_Department = null;
|
||||
}
|
||||
}
|
||||
if (ListDetailDepartment != null && ListDetailDepartment.Any())
|
||||
{
|
||||
foreach (var item in ListDetailDepartment)
|
||||
{
|
||||
item.Nav_Department = null;
|
||||
}
|
||||
}
|
||||
if (entity.STATUS == PFStandardStatus.Sign)
|
||||
{
|
||||
//审批
|
||||
if (ListPlanDetail != null && ListPlanDetail.Count() > 0)
|
||||
{
|
||||
int rowIndex = 0;
|
||||
foreach (var item in ListPlanDetail)
|
||||
{
|
||||
rowIndex++;
|
||||
if (item.CLASSHOUR <= 0)
|
||||
{
|
||||
throw new Exception("培训学时必须大于0!行:" + rowIndex);
|
||||
}
|
||||
if (!item.DEPARTMENT_ID.HasValue)
|
||||
{
|
||||
throw new Exception("请选择培训组织!行:" + rowIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
MFlowPermitService.InsertApprove(null, "SE071", ((int)entity.TYPE).ToString(), entity.ID, "SE071_SHOWPRINT", entity.TaskID, true, () =>
|
||||
{
|
||||
UpdateEntityNoCommit(entity);
|
||||
if (Files != null && Files.Any())
|
||||
BantchSaveEntityNoCommit(Files);
|
||||
if (ListPlanDetail != null && ListPlanDetail.Any())
|
||||
BantchSaveEntityNoCommit(ListPlanDetail);
|
||||
if (ListDetailDepartment != null && ListDetailDepartment.Any())
|
||||
BantchSaveEntityNoCommit(ListDetailDepartment);
|
||||
}, null, APT.Infrastructure.Api.AppContext.CurrentSession.UserID, null, null, null, "SE071_SHOWPRINT", null, null, FMTASKTYPE.Default);
|
||||
}
|
||||
this.UnifiedCommit(() =>
|
||||
{
|
||||
UpdateEntityNoCommit(entity);
|
||||
if (Files != null && Files.Any())
|
||||
BantchSaveEntityNoCommit(Files);
|
||||
if (ListPlanDetail != null && ListPlanDetail.Any())
|
||||
BantchSaveEntityNoCommit(ListPlanDetail);
|
||||
if (ListDetailDepartment != null && ListDetailDepartment.Any())
|
||||
BantchSaveEntityNoCommit(ListDetailDepartment);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 获得单条实体数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("GetSuit")]
|
||||
public JsonActionResult<T_SE_TRAIN_PLAN> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
var result = GetEntity<T_SE_TRAIN_PLAN>(null, filter, null);
|
||||
if (result.Nav_ListPlanDetail != null && result.Nav_ListPlanDetail.Any())
|
||||
{
|
||||
foreach (var item in result.Nav_ListPlanDetail)
|
||||
{
|
||||
item.MONTH = item.DATE_TRAIN.Month;
|
||||
}
|
||||
result.Nav_ListPlanDetail = result.Nav_ListPlanDetail.OrderBy(e => e.DEPARTMENT_ID).ThenBy(e => e.DATE_TRAIN).ToList();
|
||||
}
|
||||
return result;
|
||||
});
|
||||
}
|
||||
/// <summary>
|
||||
/// 部门级培训计划新增时 默认带出 公司级的信息
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("GetIni")]
|
||||
public JsonActionResult<T_SE_TRAIN_PLAN> GetIni([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return SafeExecute(() =>
|
||||
{
|
||||
T_SE_TRAIN_PLAN result = new T_SE_TRAIN_PLAN();
|
||||
result.ID = Guid.NewGuid();
|
||||
int Year = DateTime.Now.Year;
|
||||
if (!string.IsNullOrEmpty(filter.Parameter1))
|
||||
{
|
||||
try
|
||||
{
|
||||
Year = int.Parse(filter.Parameter1);
|
||||
}
|
||||
catch
|
||||
{
|
||||
Year = DateTime.Now.Year;
|
||||
}
|
||||
}
|
||||
DateTime dtMax = Convert.ToDateTime(Year + "-12-31 23:59:59");
|
||||
DateTime dtMin = dtMax.AddMilliseconds(1).AddYears(-1);
|
||||
result.TYPE = MS.Domain.Enums.PlanType.Department;
|
||||
result.YEAR = Year;
|
||||
result.LAUNCH_USER_ID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
|
||||
result.DEPARTMENT_ID = APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID;
|
||||
result.LAUNCH_TIME = DateTime.Now;
|
||||
var detail = GetEntities<T_SE_TRAIN_PLAN_DETAIL>(e => e.DATE_TRAIN >= dtMin && e.DATE_TRAIN <= dtMax && e.DEPARTMENT_ID.HasValue && e.DEPARTMENT_ID.Value == APT.Infrastructure.Api.AppContext.CurrentSession.DepartmentID && !e.IS_DELETED && e.STATUS != PFStandardStatus.Draft && e.Nav_Plan.STATUS == PFStandardStatus.Archived, null, "Nav_Plan").ToList();
|
||||
if (detail != null && detail.Count() > 0)
|
||||
{
|
||||
detail = detail.OrderBy(e => e.DATE_TRAIN).ToList();
|
||||
if (detail != null && detail.Count() > 0 && !result.PLAN_ID.HasValue)
|
||||
{
|
||||
result.PLAN_ID = detail[0].PLAN_ID;
|
||||
}
|
||||
foreach (var item in detail)
|
||||
{
|
||||
item.PLAN_DETAIL_ID = item.ID;
|
||||
item.ID = Guid.NewGuid();
|
||||
item.CREATE_TIME = DateTime.Now;
|
||||
item.PLAN_ID = result.ID;
|
||||
item.MONTH = item.DATE_TRAIN.Month;
|
||||
item.DEPARTMENT_ID = null;
|
||||
item.STATUS = PFStandardStatus.Draft;
|
||||
item.Nav_Plan = null;
|
||||
}
|
||||
result.Nav_ListPlanDetail = detail;
|
||||
}
|
||||
return result;
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 隐患上报 审核通过 给每个通知负责人发送通知
|
||||
/// </summary>
|
||||
/// <param name="entity"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("PlanAuditNew")]
|
||||
public JsonActionResult<bool> PlanAuditNew([FromBody] T_PF_APPROVE entity)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
return ApproveCallBackService.CallBackNew("SE/SETrainPlan/PlanAuditNew", entity);
|
||||
});
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 年度培训计划驳回
|
||||
/// </summary>
|
||||
/// <param name="model"></param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("PlanAuditBack")]
|
||||
public JsonActionResult<bool> PlanAuditBack([FromBody] T_PF_APPROVE model)
|
||||
{
|
||||
return SafeExecute<bool>(() =>
|
||||
{
|
||||
T_PF_APPROVE modelApp = null;
|
||||
List<T_PF_APPROVE_DETAIL> listAppDetail = null;
|
||||
T_FM_NOTIFICATION_TASK taskFinish = null;
|
||||
string Msg = string.Empty;
|
||||
bool ResultGetInfo = ApproveCallBackService.GetApproject(model, ref modelApp, ref listAppDetail, ref taskFinish, ref Msg);
|
||||
if (!ResultGetInfo)
|
||||
throw new Exception("驳回失败!");
|
||||
if (modelApp == null || listAppDetail == null)
|
||||
throw new Exception("获取驳回信息失败!");
|
||||
|
||||
var entity = this.GetEntity<T_SE_TRAIN_PLAN>(model.DATA_ID);
|
||||
string NAME = string.Empty;
|
||||
if (entity.LAUNCH_USER_ID.HasValue)
|
||||
{
|
||||
NAME= GetEntity<T_FM_USER>(entity.LAUNCH_USER_ID.Value)?.NAME;
|
||||
}
|
||||
|
||||
entity.STATUS = PFStandardStatus.Rejected;
|
||||
T_FM_NOTIFICATION_TASK noticeBack = NotificationTaskService.InsertUserNoticeTaskModel("(驳回)年度培训计划", entity.ID, entity.ORG_ID, (Guid)entity.LAUNCH_USER_ID, NAME, DateTime.Now, (int)FMNoticeTypeEnum.消息, "SE071", FMTASKTYPE.Default);
|
||||
//entity.Nav_User = null;
|
||||
|
||||
UnifiedCommit(() =>
|
||||
{
|
||||
if (entity != null)
|
||||
this.UpdateEntityNoCommit(entity);
|
||||
if (noticeBack != null)
|
||||
this.UpdateEntityNoCommit(noticeBack);
|
||||
if (modelApp != null)
|
||||
UpdateEntityNoCommit(modelApp);
|
||||
if (listAppDetail != null && listAppDetail.Count > 0)
|
||||
BantchUpdateEntityNoCommit(listAppDetail);
|
||||
if (taskFinish != null)
|
||||
UpdateEntityNoCommit(taskFinish);
|
||||
});
|
||||
return true;
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user