加字段
This commit is contained in:
parent
d2c825b525
commit
40fd77b026
136984
APT.Data.Migrations/Migrations/20251206043336_hmr2025120601.Designer.cs
generated
Normal file
136984
APT.Data.Migrations/Migrations/20251206043336_hmr2025120601.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
125
APT.Data.Migrations/Migrations/20251206043336_hmr2025120601.cs
Normal file
125
APT.Data.Migrations/Migrations/20251206043336_hmr2025120601.cs
Normal file
@ -0,0 +1,125 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace APT.Data.Migrations.Migrations
|
||||
{
|
||||
public partial class hmr2025120601 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "USER_ID",
|
||||
table: "T_FO_SCHEDULING",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true,
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uniqueidentifier");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "CLASS_ID",
|
||||
table: "T_FO_SCHEDULING",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "DRIVER_ID",
|
||||
table: "T_FO_SCHEDULING",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "TECH_ID",
|
||||
table: "T_FO_SCHEDULING",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_FO_SCHEDULING_CLASS_ID",
|
||||
table: "T_FO_SCHEDULING",
|
||||
column: "CLASS_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_FO_SCHEDULING_DRIVER_ID",
|
||||
table: "T_FO_SCHEDULING",
|
||||
column: "DRIVER_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_FO_SCHEDULING_TECH_ID",
|
||||
table: "T_FO_SCHEDULING",
|
||||
column: "TECH_ID");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_T_FO_SCHEDULING_T_FM_CLASS_CLASS_ID",
|
||||
table: "T_FO_SCHEDULING",
|
||||
column: "CLASS_ID",
|
||||
principalTable: "T_FM_CLASS",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_T_FO_SCHEDULING_T_FM_USER_DRIVER_ID",
|
||||
table: "T_FO_SCHEDULING",
|
||||
column: "DRIVER_ID",
|
||||
principalTable: "T_FM_USER",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_T_FO_SCHEDULING_T_FM_USER_TECH_ID",
|
||||
table: "T_FO_SCHEDULING",
|
||||
column: "TECH_ID",
|
||||
principalTable: "T_FM_USER",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_T_FO_SCHEDULING_T_FM_CLASS_CLASS_ID",
|
||||
table: "T_FO_SCHEDULING");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_T_FO_SCHEDULING_T_FM_USER_DRIVER_ID",
|
||||
table: "T_FO_SCHEDULING");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_T_FO_SCHEDULING_T_FM_USER_TECH_ID",
|
||||
table: "T_FO_SCHEDULING");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_T_FO_SCHEDULING_CLASS_ID",
|
||||
table: "T_FO_SCHEDULING");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_T_FO_SCHEDULING_DRIVER_ID",
|
||||
table: "T_FO_SCHEDULING");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_T_FO_SCHEDULING_TECH_ID",
|
||||
table: "T_FO_SCHEDULING");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "CLASS_ID",
|
||||
table: "T_FO_SCHEDULING");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DRIVER_ID",
|
||||
table: "T_FO_SCHEDULING");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "TECH_ID",
|
||||
table: "T_FO_SCHEDULING");
|
||||
|
||||
migrationBuilder.AlterColumn<Guid>(
|
||||
name: "USER_ID",
|
||||
table: "T_FO_SCHEDULING",
|
||||
type: "uniqueidentifier",
|
||||
nullable: false,
|
||||
defaultValue: new Guid("00000000-0000-0000-0000-000000000000"),
|
||||
oldClrType: typeof(Guid),
|
||||
oldType: "uniqueidentifier",
|
||||
oldNullable: true);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -37668,6 +37668,9 @@ namespace APT.Data.Migrations.Migrations
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("CLASS_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("CREATER_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
@ -37677,6 +37680,9 @@ namespace APT.Data.Migrations.Migrations
|
||||
b.Property<DateTime>("DATE")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid?>("DRIVER_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("ENTITY_ORG_TPYE")
|
||||
.HasColumnType("int");
|
||||
|
||||
@ -37709,7 +37715,10 @@ namespace APT.Data.Migrations.Migrations
|
||||
.HasMaxLength(500)
|
||||
.HasColumnType("nvarchar(500)");
|
||||
|
||||
b.Property<Guid>("USER_ID")
|
||||
b.Property<Guid?>("TECH_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("USER_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<string>("WEEK")
|
||||
@ -37718,8 +37727,14 @@ namespace APT.Data.Migrations.Migrations
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("CLASS_ID");
|
||||
|
||||
b.HasIndex("DRIVER_ID");
|
||||
|
||||
b.HasIndex("ORG_ID");
|
||||
|
||||
b.HasIndex("TECH_ID");
|
||||
|
||||
b.HasIndex("USER_ID");
|
||||
|
||||
b.ToTable("T_FO_SCHEDULING");
|
||||
@ -110636,20 +110651,40 @@ namespace APT.Data.Migrations.Migrations
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.FO.T_FO_SCHEDULING", b =>
|
||||
{
|
||||
b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_CLASS", "Nav_Class")
|
||||
.WithMany()
|
||||
.HasForeignKey("CLASS_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_Driver")
|
||||
.WithMany()
|
||||
.HasForeignKey("DRIVER_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
|
||||
.WithMany()
|
||||
.HasForeignKey("ORG_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_Tech")
|
||||
.WithMany()
|
||||
.HasForeignKey("TECH_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_USER", "Nav_User")
|
||||
.WithMany()
|
||||
.HasForeignKey("USER_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.Navigation("Nav_Class");
|
||||
|
||||
b.Navigation("Nav_Driver");
|
||||
|
||||
b.Navigation("Nav_Org");
|
||||
|
||||
b.Navigation("Nav_Tech");
|
||||
|
||||
b.Navigation("Nav_User");
|
||||
});
|
||||
|
||||
|
||||
@ -2114,8 +2114,11 @@ builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_Tech).WithMany().HasForeignKey(t => t.TECH_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_Driver).WithMany().HasForeignKey(t => t.DRIVER_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.Property(t => t.WEEK).HasMaxLength(500);
|
||||
builder.Property(t => t.PHONE).HasMaxLength(500);
|
||||
builder.HasOne(t => t.Nav_Class).WithMany().HasForeignKey(t => t.CLASS_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
|
||||
@ -13,17 +13,36 @@ namespace APT.MS.Domain.Entities.FO
|
||||
[Description("日期")]
|
||||
public DateTime DATE { get; set; }
|
||||
|
||||
[Description("人员")]
|
||||
[Description("值班领导")]
|
||||
[DataFieldForeignKey("Nav_User")]
|
||||
public Guid USER_ID { get; set; }
|
||||
[Description("导航:人员")]
|
||||
public Guid? USER_ID { get; set; }
|
||||
[Description("导航:值班领导")]
|
||||
[FormFieldQuery]
|
||||
public virtual T_FM_USER Nav_User { get; set; }
|
||||
[Description("技术人员")]
|
||||
[DataFieldForeignKey("Nav_Tech")]
|
||||
public Guid? TECH_ID { get; set; }
|
||||
[Description("导航:技术人员")]
|
||||
[FormFieldQuery]
|
||||
public virtual T_FM_USER Nav_Tech { get; set; }
|
||||
[Description("值班司机")]
|
||||
[DataFieldForeignKey("Nav_Driver")]
|
||||
public Guid? DRIVER_ID { get; set; }
|
||||
[Description("导航:值班司机")]
|
||||
[FormFieldQuery]
|
||||
public virtual T_FM_USER Nav_Driver { get; set; }
|
||||
|
||||
[Description("星期")]
|
||||
public string WEEK { get; set; }
|
||||
|
||||
[Description("电话")]
|
||||
public string PHONE { get; set; }
|
||||
|
||||
[Description("班次")]
|
||||
[DataFieldForeignKey("Nav_Class")]
|
||||
public Guid? CLASS_ID { get; set; }
|
||||
[Description("导航:班次")]
|
||||
[FormFieldQuery]
|
||||
public virtual T_FM_CLASS Nav_Class { get; set; }
|
||||
}
|
||||
}
|
||||
|
||||
@ -1488,7 +1488,8 @@ namespace APT.PP.WebApi.Controllers.Api
|
||||
var identityPlanIds = identitys.Select(t => t.IDENTIFY_EVALUATION_PLAN_ID).Distinct().ToList();
|
||||
//plans = planTemps.Where(t => identityPlanIds.Contains(t.ID)).ToList();
|
||||
var identityIds = identitys.Select(i => i.ID).ToList();
|
||||
tasks = this.GetEntities<T_FM_NOTIFICATION_TASK>(t => identityIds.Contains((Guid)t.SOURCE_DATA_ID) && t.NOTICE_STATUS == 0, new BaseFilter(filter.OrgId)).ToList();
|
||||
var approvIds = this.GetEntities<T_PF_APPROVE>(t => identityIds.Contains(t.DATA_ID), new BaseFilter(filter.OrgId)).Select(m => m.ID).ToList();
|
||||
tasks = this.GetEntities<T_FM_NOTIFICATION_TASK>(t => (identityIds.Contains((Guid)t.SOURCE_DATA_ID) || approvIds.Contains((Guid)t.SOURCE_DATA_ID)) && t.NOTICE_STATUS == 0, new BaseFilter(filter.OrgId)).ToList();
|
||||
var identityTempIds = identityTemps.Select(t => t.ID).ToList();
|
||||
var details = GetEntities<T_SK_RISK_IDENTIFY_DETAIL>(i => identityTempIds.Contains(i.RISK_IDENTIFY_ID), new BaseFilter(filter.OrgId)).ToList();
|
||||
var identityDetailIds = details.Select(t => t.ID).ToList();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user