Compare commits
No commits in common. "e628bdc3d6179d979745189472e30e61db16331e" and "fe170dbb6d7b16b6afb391957beca6574c1f04d9" have entirely different histories.
e628bdc3d6
...
fe170dbb6d
File diff suppressed because it is too large
Load Diff
@ -1,45 +0,0 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace APT.Data.Migrations.Migrations
|
||||
{
|
||||
public partial class wyw2026041001 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "APPROVAL_ROLE_ID",
|
||||
table: "T_SE_TRAIN_PLAN_DETAIL",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SE_TRAIN_PLAN_DETAIL_APPROVAL_ROLE_ID",
|
||||
table: "T_SE_TRAIN_PLAN_DETAIL",
|
||||
column: "APPROVAL_ROLE_ID");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_T_SE_TRAIN_PLAN_DETAIL_T_PF_APPROVAL_ROLE_APPROVAL_ROLE_ID",
|
||||
table: "T_SE_TRAIN_PLAN_DETAIL",
|
||||
column: "APPROVAL_ROLE_ID",
|
||||
principalTable: "T_PF_APPROVAL_ROLE",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_T_SE_TRAIN_PLAN_DETAIL_T_PF_APPROVAL_ROLE_APPROVAL_ROLE_ID",
|
||||
table: "T_SE_TRAIN_PLAN_DETAIL");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_T_SE_TRAIN_PLAN_DETAIL_APPROVAL_ROLE_ID",
|
||||
table: "T_SE_TRAIN_PLAN_DETAIL");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "APPROVAL_ROLE_ID",
|
||||
table: "T_SE_TRAIN_PLAN_DETAIL");
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -75529,9 +75529,6 @@ namespace APT.Data.Migrations.Migrations
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("APPROVAL_ROLE_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("CHECKTYPE")
|
||||
.HasColumnType("int");
|
||||
|
||||
@ -75615,8 +75612,6 @@ namespace APT.Data.Migrations.Migrations
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("APPROVAL_ROLE_ID");
|
||||
|
||||
b.HasIndex("DEPARTMENT_ID");
|
||||
|
||||
b.HasIndex("ORG_ID");
|
||||
@ -126449,11 +126444,6 @@ namespace APT.Data.Migrations.Migrations
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SE.T_SE_TRAIN_PLAN_DETAIL", b =>
|
||||
{
|
||||
b.HasOne("APT.MS.Domain.Entities.PF.T_PF_APPROVAL_ROLE", "Nav_ApproveRole")
|
||||
.WithMany()
|
||||
.HasForeignKey("APPROVAL_ROLE_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
|
||||
.WithMany()
|
||||
.HasForeignKey("DEPARTMENT_ID")
|
||||
@ -126476,8 +126466,6 @@ namespace APT.Data.Migrations.Migrations
|
||||
.HasForeignKey("TYPE_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.Navigation("Nav_ApproveRole");
|
||||
|
||||
b.Navigation("Nav_Department");
|
||||
|
||||
b.Navigation("Nav_Org");
|
||||
|
||||
@ -11129,7 +11129,6 @@ builder.HasOne(t => t.Nav_TrainTypeEnum).WithMany().HasForeignKey(t => t.TYPE_ID
|
||||
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);
|
||||
builder.HasOne(t => t.Nav_ApproveRole).WithMany().HasForeignKey(t => t.APPROVAL_ROLE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -2,7 +2,6 @@
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.BaseData.Domain.Enums.PF;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Entities.PF;
|
||||
using APT.MS.Domain.Enums;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
@ -159,19 +158,5 @@ namespace APT.MS.Domain.Entities.SE
|
||||
[FormFieldEdit]
|
||||
[FormFieldQuery]
|
||||
public PFStandardStatus STATUS { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 培训角色
|
||||
/// 与 培训组织 匹配
|
||||
/// </summary>
|
||||
[Description("培训角色")]
|
||||
[DataFieldForeignKey("Nav_ApproveRole")]
|
||||
public Guid? APPROVAL_ROLE_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 审批角色
|
||||
/// </summary>
|
||||
[Description("培训角色")]
|
||||
public T_PF_APPROVAL_ROLE Nav_ApproveRole { get; set; }
|
||||
}
|
||||
}
|
||||
@ -27,7 +27,6 @@ using log4net.Core;
|
||||
using APT.WebApi.Models;
|
||||
using APT.MS.Domain.Entities.SC.BI;
|
||||
using Microsoft.Extensions.DependencyModel;
|
||||
using System.Linq.Expressions;
|
||||
|
||||
namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
{
|
||||
@ -2225,18 +2224,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
//培训组织 获取对应安全员 或者负责人 接收培训通知
|
||||
var listDepGetNotice = listRAdd.Select(e => e.DEPARTMENT_ID.Value);
|
||||
|
||||
var listRoleID = listRAdd.Where(e => e.APPROVAL_ROLE_ID.HasValue).Select(e => e.APPROVAL_ROLE_ID.Value);
|
||||
Expression<Func<T_PF_APPROVAL_ROLE, bool>> expression = e => !e.IS_DELETED;
|
||||
if (listRoleID != null && listRoleID.Count() > 0)
|
||||
{
|
||||
expression = expression.And(e => (listRoleID.Contains(e.ID) || e.NAME.Contains("安全员")));
|
||||
}
|
||||
else
|
||||
{
|
||||
expression = expression.And(e => e.NAME.Contains("安全员"));
|
||||
}
|
||||
|
||||
var approveRole = GetEntities(expression, null);
|
||||
var approveRole = GetEntities<T_PF_APPROVAL_ROLE>(e => !e.IS_DELETED && e.NAME.Contains("安全员"), null);
|
||||
var RroleID = approveRole.Select(e => e.ID);
|
||||
//安全员
|
||||
var listUserGet = GetEntities<T_FM_USER>(e => e.APPROVE_ROLE_ID.HasValue && RroleID.Contains(e.APPROVE_ROLE_ID.Value), null);
|
||||
@ -2255,15 +2243,7 @@ namespace APT.PP.WebApi.Controllers.Api.PP
|
||||
var alltoDayNotifyTitles = new List<string>();
|
||||
foreach (var item in listRAdd)
|
||||
{
|
||||
if (item.APPROVAL_ROLE_ID.HasValue)
|
||||
{
|
||||
modelDetailPer = listUserGet.FirstOrDefault(e => e.APPROVE_ROLE_ID.Value == item.APPROVAL_ROLE_ID.Value && e.DEPARTMENT_ID.Value == item.DEPARTMENT_ID.Value);
|
||||
}
|
||||
else
|
||||
{
|
||||
modelDetailPer = listUserGet.FirstOrDefault(e => e.DEPARTMENT_ID.Value == item.DEPARTMENT_ID.Value);
|
||||
}
|
||||
|
||||
modelDetailPer = listUserGet.FirstOrDefault(e => e.DEPARTMENT_ID.Value == item.DEPARTMENT_ID.Value);
|
||||
if (modelDetailPer == null)
|
||||
{
|
||||
modelDetailPer = listDep.FirstOrDefault(e => e.ID == item.DEPARTMENT_ID.Value)?.Nav_User;
|
||||
|
||||
@ -122,10 +122,6 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
||||
{
|
||||
throw new Exception("请选择培训组织!行:" + rowIndex);
|
||||
}
|
||||
if (!item.APPROVAL_ROLE_ID.HasValue)
|
||||
{
|
||||
throw new Exception("请选择培训角色!行:" + rowIndex);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -171,7 +167,7 @@ namespace APT.SC.WebApi.Controllers.Api.SE
|
||||
{
|
||||
foreach (var item in filter.Include)
|
||||
{
|
||||
if (item.IndexOf("Nav_Approve.") > -1)
|
||||
if (item.IndexOf("Nav_Approve") > -1)
|
||||
{
|
||||
var list = filter.Include.ToList();
|
||||
list.Remove(item);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user