风险辨识
This commit is contained in:
parent
387139244d
commit
c2e7a306b5
File diff suppressed because it is too large
Load Diff
136691
APT.Data.Migrations/Migrations/20251203153918_hmr2025120301.Designer.cs
generated
Normal file
136691
APT.Data.Migrations/Migrations/20251203153918_hmr2025120301.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
244
APT.Data.Migrations/Migrations/20251203153918_hmr2025120301.cs
Normal file
244
APT.Data.Migrations/Migrations/20251203153918_hmr2025120301.cs
Normal file
@ -0,0 +1,244 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace APT.Data.Migrations.Migrations
|
||||
{
|
||||
public partial class hmr2025120301 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_T_FM_USER_POST_POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_T_FM_USER_POST_POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST",
|
||||
newName: "DEPARTMENT_ID");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST",
|
||||
newName: "IX_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DEPARTMENT_ID");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST",
|
||||
newName: "DEPARTMENT_ID");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST",
|
||||
newName: "IX_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DEPARTMENT_ID");
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "DEPARTMENT_TYPE",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.AddColumn<int>(
|
||||
name: "DEPARTMENT_TYPE",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST",
|
||||
type: "int",
|
||||
nullable: false,
|
||||
defaultValue: 0);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
RISK_IDENTIFY_DETAIL_RESULT_POST_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
POST_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_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL", x => x.ID);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_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_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL_T_FM_USER_POST_POST_ID",
|
||||
column: x => x.POST_ID,
|
||||
principalTable: "T_FM_USER_POST",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_RISK_IDENTIFY_DETAIL_RESULT_POST_ID",
|
||||
column: x => x.RISK_IDENTIFY_DETAIL_RESULT_POST_ID,
|
||||
principalTable: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
IDENTIFY_RESULT_SUMMARY_POST_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
POST_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_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL", x => x.ID);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_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_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL_T_FM_USER_POST_POST_ID",
|
||||
column: x => x.POST_ID,
|
||||
principalTable: "T_FM_USER_POST",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_IDENTIFY_RESULT_SUMMARY_POST_ID",
|
||||
column: x => x.IDENTIFY_RESULT_SUMMARY_POST_ID,
|
||||
principalTable: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL_ORG_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL",
|
||||
column: "ORG_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL_POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL",
|
||||
column: "POST_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL_RISK_IDENTIFY_DETAIL_RESULT_POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL",
|
||||
column: "RISK_IDENTIFY_DETAIL_RESULT_POST_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL_IDENTIFY_RESULT_SUMMARY_POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL",
|
||||
column: "IDENTIFY_RESULT_SUMMARY_POST_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL_ORG_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL",
|
||||
column: "ORG_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL_POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL",
|
||||
column: "POST_ID");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_T_FM_DEPARTMENT_DEPARTMENT_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST",
|
||||
column: "DEPARTMENT_ID",
|
||||
principalTable: "T_FM_DEPARTMENT",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_T_FM_DEPARTMENT_DEPARTMENT_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST",
|
||||
column: "DEPARTMENT_ID",
|
||||
principalTable: "T_FM_DEPARTMENT",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_T_FM_DEPARTMENT_DEPARTMENT_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST");
|
||||
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_T_FM_DEPARTMENT_DEPARTMENT_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DEPARTMENT_TYPE",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "DEPARTMENT_TYPE",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "DEPARTMENT_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST",
|
||||
newName: "POST_ID");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DEPARTMENT_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST",
|
||||
newName: "IX_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_POST_ID");
|
||||
|
||||
migrationBuilder.RenameColumn(
|
||||
name: "DEPARTMENT_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST",
|
||||
newName: "POST_ID");
|
||||
|
||||
migrationBuilder.RenameIndex(
|
||||
name: "IX_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DEPARTMENT_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST",
|
||||
newName: "IX_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_POST_ID");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_T_FM_USER_POST_POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST",
|
||||
column: "POST_ID",
|
||||
principalTable: "T_FM_USER_POST",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_T_FM_USER_POST_POST_ID",
|
||||
table: "T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST",
|
||||
column: "POST_ID",
|
||||
principalTable: "T_FM_USER_POST",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -84989,6 +84989,12 @@ namespace APT.Data.Migrations.Migrations
|
||||
b.Property<DateTime?>("CREATE_TIME")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid?>("DEPARTMENT_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("DEPARTMENT_TYPE")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ENTITY_ORG_TPYE")
|
||||
.HasColumnType("int");
|
||||
|
||||
@ -85020,10 +85026,64 @@ namespace APT.Data.Migrations.Migrations
|
||||
.IsRequired()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("RISK_IDENTIFY_RESULT_DETAIL_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("DEPARTMENT_ID");
|
||||
|
||||
b.HasIndex("ORG_ID");
|
||||
|
||||
b.HasIndex("RISK_IDENTIFY_RESULT_DETAIL_ID");
|
||||
|
||||
b.ToTable("T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL", b =>
|
||||
{
|
||||
b.Property<Guid>("ID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("CREATER_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime?>("CREATE_TIME")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("ENTITY_ORG_TPYE")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid?>("FLOW_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("FLOW_SEND_STATUS")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("FLOW_STATUS")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid?>("FORM_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<bool>("IS_DELETED")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<Guid?>("MODIFIER_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime?>("MODIFY_TIME")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid?>("ORG_ID")
|
||||
.IsRequired()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("POST_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("RISK_IDENTIFY_RESULT_DETAIL_ID")
|
||||
b.Property<Guid>("RISK_IDENTIFY_DETAIL_RESULT_POST_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("ID");
|
||||
@ -85032,9 +85092,9 @@ namespace APT.Data.Migrations.Migrations
|
||||
|
||||
b.HasIndex("POST_ID");
|
||||
|
||||
b.HasIndex("RISK_IDENTIFY_RESULT_DETAIL_ID");
|
||||
b.HasIndex("RISK_IDENTIFY_DETAIL_RESULT_POST_ID");
|
||||
|
||||
b.ToTable("T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST");
|
||||
b.ToTable("T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_FILE", b =>
|
||||
@ -85898,6 +85958,12 @@ namespace APT.Data.Migrations.Migrations
|
||||
b.Property<DateTime?>("CREATE_TIME")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid?>("DEPARTMENT_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("DEPARTMENT_TYPE")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("ENTITY_ORG_TPYE")
|
||||
.HasColumnType("int");
|
||||
|
||||
@ -85932,18 +85998,72 @@ namespace APT.Data.Migrations.Migrations
|
||||
.IsRequired()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("POST_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("DEPARTMENT_ID");
|
||||
|
||||
b.HasIndex("IDENTIFY_RESULT_SUMMARY_DETAIL_ID");
|
||||
|
||||
b.HasIndex("ORG_ID");
|
||||
|
||||
b.ToTable("T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL", 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>("IDENTIFY_RESULT_SUMMARY_POST_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?>("POST_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("IDENTIFY_RESULT_SUMMARY_POST_ID");
|
||||
|
||||
b.HasIndex("ORG_ID");
|
||||
|
||||
b.HasIndex("POST_ID");
|
||||
|
||||
b.ToTable("T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST");
|
||||
b.ToTable("T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_REQUIRE", b =>
|
||||
@ -128224,6 +128344,32 @@ namespace APT.Data.Migrations.Migrations
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST", 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.SK.T_SK_RISK_IDENTIFY_RESULT_DETAIL", "Nav_IdentifyDetail")
|
||||
.WithMany("Nav_DetailPosts")
|
||||
.HasForeignKey("RISK_IDENTIFY_RESULT_DETAIL_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Nav_Department");
|
||||
|
||||
b.Navigation("Nav_IdentifyDetail");
|
||||
|
||||
b.Navigation("Nav_Org");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL", b =>
|
||||
{
|
||||
b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
|
||||
.WithMany()
|
||||
@ -128236,13 +128382,13 @@ namespace APT.Data.Migrations.Migrations
|
||||
.HasForeignKey("POST_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_DETAIL", "Nav_IdentifyDetail")
|
||||
.WithMany("Nav_DetailPosts")
|
||||
.HasForeignKey("RISK_IDENTIFY_RESULT_DETAIL_ID")
|
||||
b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST", "Nav_DetailPost")
|
||||
.WithMany("Nav_ResultPostDets")
|
||||
.HasForeignKey("RISK_IDENTIFY_DETAIL_RESULT_POST_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Nav_IdentifyDetail");
|
||||
b.Navigation("Nav_DetailPost");
|
||||
|
||||
b.Navigation("Nav_Org");
|
||||
|
||||
@ -128622,6 +128768,11 @@ namespace APT.Data.Migrations.Migrations
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST", b =>
|
||||
{
|
||||
b.HasOne("APT.BaseData.Domain.Entities.FM.T_FM_DEPARTMENT", "Nav_Department")
|
||||
.WithMany()
|
||||
.HasForeignKey("DEPARTMENT_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict);
|
||||
|
||||
b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_DETAIL", "Nav_SummaryDetail")
|
||||
.WithMany("Nav_DetailPosts")
|
||||
.HasForeignKey("IDENTIFY_RESULT_SUMMARY_DETAIL_ID")
|
||||
@ -128634,6 +128785,27 @@ namespace APT.Data.Migrations.Migrations
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Nav_Department");
|
||||
|
||||
b.Navigation("Nav_Org");
|
||||
|
||||
b.Navigation("Nav_SummaryDetail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL", b =>
|
||||
{
|
||||
b.HasOne("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST", "Nav_SummaryPost")
|
||||
.WithMany("Nav_SumPostDets")
|
||||
.HasForeignKey("IDENTIFY_RESULT_SUMMARY_POST_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.BaseData.Domain.Entities.FM.T_FM_USER_POST", "Nav_Post")
|
||||
.WithMany()
|
||||
.HasForeignKey("POST_ID")
|
||||
@ -128643,7 +128815,7 @@ namespace APT.Data.Migrations.Migrations
|
||||
|
||||
b.Navigation("Nav_Post");
|
||||
|
||||
b.Navigation("Nav_SummaryDetail");
|
||||
b.Navigation("Nav_SummaryPost");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_REQUIRE", b =>
|
||||
@ -136064,6 +136236,11 @@ namespace APT.Data.Migrations.Migrations
|
||||
b.Navigation("Nav_DetailMeasures");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST", b =>
|
||||
{
|
||||
b.Navigation("Nav_ResultPostDets");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT", b =>
|
||||
{
|
||||
b.Navigation("Nav_Details");
|
||||
@ -136100,6 +136277,11 @@ namespace APT.Data.Migrations.Migrations
|
||||
b.Navigation("Nav_DetailPosts");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST", b =>
|
||||
{
|
||||
b.Navigation("Nav_SumPostDets");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.SK.T_SK_SECURITY_INSPECTION_NOTICE", b =>
|
||||
{
|
||||
b.Navigation("Nav_CheckNoticeDetails");
|
||||
|
||||
@ -14686,6 +14686,17 @@ builder.Property(t => t.EMERGENCY).HasMaxLength(500);
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_IdentifyDetail).WithMany(t=>t.Nav_DetailPosts).HasForeignKey(t => t.RISK_IDENTIFY_RESULT_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region RiskIdentifyDetailResultPostDetail
|
||||
public partial class SKRiskIdentifyDetailResultPostDetailMap :APTEntityBaseMap<T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_DetailPost).WithMany(t=>t.Nav_ResultPostDets).HasForeignKey(t => t.RISK_IDENTIFY_DETAIL_RESULT_POST_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_Post).WithMany().HasForeignKey(t => t.POST_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
@ -14858,6 +14869,17 @@ builder.Property(t => t.EMERGENCY).HasMaxLength(500);
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_SummaryDetail).WithMany(t=>t.Nav_DetailPosts).HasForeignKey(t => t.IDENTIFY_RESULT_SUMMARY_DETAIL_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region RiskIdentifyResultSummaryPostDetail
|
||||
public partial class SKRiskIdentifyResultSummaryPostDetailMap :APTEntityBaseMap<T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_SummaryPost).WithMany(t=>t.Nav_SumPostDets).HasForeignKey(t => t.IDENTIFY_RESULT_SUMMARY_POST_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_Post).WithMany().HasForeignKey(t => t.POST_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.BaseData.Domain.Enums;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Enums.SK;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@ -21,17 +23,26 @@ namespace APT.MS.Domain.Entities.SK
|
||||
/// 导航:安全风险辨识结果明细
|
||||
/// </summary>
|
||||
[Description("导航:安全风险辨识结果明细")]
|
||||
public virtual T_SK_RISK_IDENTIFY_RESULT_DETAIL Nav_IdentifyDetail { get; set; }
|
||||
|
||||
|
||||
public virtual T_SK_RISK_IDENTIFY_RESULT_DETAIL Nav_IdentifyDetail { get; set; }
|
||||
|
||||
[Description("序号")]
|
||||
public int? NUM { get; set; }
|
||||
|
||||
[Description("岗位")]
|
||||
[DataFieldForeignKey("Nav_Post")]
|
||||
public Guid? POST_ID { get; set; }
|
||||
[Description("辨识层级")]
|
||||
[EnumName("SKDepartmentTypeEnum")]
|
||||
public SKDepartmentTypeEnum DEPARTMENT_TYPE { get; set; }
|
||||
|
||||
[Description("导航属性:岗位")]
|
||||
public virtual T_FM_USER_POST Nav_Post { get; set; }
|
||||
[Description("部门")]
|
||||
[DataFieldForeignKey("Nav_Department")]
|
||||
public Guid? DEPARTMENT_ID { get; set; }
|
||||
|
||||
[Description("导航属性:部门")]
|
||||
public virtual T_FM_DEPARTMENT Nav_Department { get; set; }
|
||||
|
||||
[Description("辨识岗位")]
|
||||
[FormFieldEdit]
|
||||
public ICollection<T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL> Nav_ResultPostDets { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Text;
|
||||
|
||||
namespace APT.MS.Domain.Entities.SK
|
||||
{
|
||||
[Description("辨识岗位")]
|
||||
public class T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 安全风险辨识结果明细
|
||||
/// </summary>
|
||||
[Description("安全风险辨识结果明细")]
|
||||
[DataFieldForeignKey("Nav_DetailPost", "Nav_ResultPostDets")]
|
||||
public Guid RISK_IDENTIFY_DETAIL_RESULT_POST_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 导航:安全风险辨识结果明细
|
||||
/// </summary>
|
||||
[Description("导航:安全风险辨识结果明细")]
|
||||
public virtual T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST Nav_DetailPost { get; set; }
|
||||
|
||||
[Description("岗位")]
|
||||
[DataFieldForeignKey("Nav_Post")]
|
||||
public Guid? POST_ID { get; set; }
|
||||
|
||||
[Description("导航属性:岗位")]
|
||||
public virtual T_FM_USER_POST Nav_Post { get; set; }
|
||||
}
|
||||
}
|
||||
@ -1,5 +1,6 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using APT.MS.Domain.Enums.SK;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
@ -26,11 +27,21 @@ namespace APT.MS.Domain.Entities.SK
|
||||
[Description("序号")]
|
||||
public int? NUM { get; set; }
|
||||
|
||||
[Description("岗位")]
|
||||
[DataFieldForeignKey("Nav_Post")]
|
||||
public Guid? POST_ID { get; set; }
|
||||
[Description("辨识层级")]
|
||||
[EnumName("SKDepartmentTypeEnum")]
|
||||
public SKDepartmentTypeEnum DEPARTMENT_TYPE { get; set; }
|
||||
|
||||
[Description("导航属性:岗位")]
|
||||
public virtual T_FM_USER_POST Nav_Post { get; set; }
|
||||
[Description("部门")]
|
||||
[DataFieldForeignKey("Nav_Department")]
|
||||
public Guid? DEPARTMENT_ID { get; set; }
|
||||
|
||||
[Description("导航属性:部门")]
|
||||
public virtual T_FM_DEPARTMENT Nav_Department { get; set; }
|
||||
|
||||
[Description("辨识岗位")]
|
||||
[FormFieldEdit]
|
||||
public ICollection<T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL> Nav_SumPostDets { get; set; }
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@ -0,0 +1,33 @@
|
||||
using APT.BaseData.Domain.Entities.FM;
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
using System.Text;
|
||||
|
||||
namespace APT.MS.Domain.Entities.SK
|
||||
{
|
||||
[Description("辨识岗位")]
|
||||
public class T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST_DETAIL : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 安全风险辨识结果汇总明细
|
||||
/// </summary>
|
||||
[Description("安全风险辨识结果汇总明细")]
|
||||
[DataFieldForeignKey("Nav_SummaryPost", "Nav_SumPostDets")]
|
||||
public Guid IDENTIFY_RESULT_SUMMARY_POST_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 导航:安全风险辨识结果汇总明细
|
||||
/// </summary>
|
||||
[Description("导航:安全风险辨识结果汇总明细")]
|
||||
public virtual T_SK_RISK_IDENTIFY_RESULT_SUMMARY_POST Nav_SummaryPost { get; set; }
|
||||
|
||||
[Description("岗位")]
|
||||
[DataFieldForeignKey("Nav_Post")]
|
||||
public Guid? POST_ID { get; set; }
|
||||
|
||||
[Description("导航属性:岗位")]
|
||||
public virtual T_FM_USER_POST Nav_Post { get; set; }
|
||||
}
|
||||
}
|
||||
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,128 +1,137 @@
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// 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,356 +1,370 @@
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// 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
@ -1403,7 +1403,7 @@ namespace APT.PP.WebApi.Controllers.Api
|
||||
{
|
||||
endtime = Convert.ToDateTime(plan.END_DATE.ToString().Replace("0:00:00", "23:59:59"));
|
||||
}
|
||||
var noticeTask = NotificationTaskService.InsertUserNoticeTaskModel("安全风险辨识表(" + DateTime.Now.ToShortDateString().Replace("/", "") + ")", ide.ID, filter.OrgId, user.ID, user.NAME, DateTime.Now, endtime, (int)FMNoticeTypeEnum.消息, "SK033");
|
||||
var noticeTask = NotificationTaskService.InsertUserNoticeTaskModel("安全风险辨识表" + DateTime.Now.Month.PadLeft(2,'0') + DateTime.Now.Day.PadLeft(2, '0'), ide.ID, filter.OrgId, user.ID, user.NAME, DateTime.Now, endtime, (int)FMNoticeTypeEnum.消息, "SK033");
|
||||
notices.Add(noticeTask);
|
||||
//}
|
||||
}
|
||||
@ -1464,7 +1464,9 @@ namespace APT.PP.WebApi.Controllers.Api
|
||||
List<T_SK_RISK_IDENTIFY_RESULT> results = new List<T_SK_RISK_IDENTIFY_RESULT>();
|
||||
List<T_SK_RISK_IDENTIFY_RESULT_DETAIL> resultDetails = new List<T_SK_RISK_IDENTIFY_RESULT_DETAIL>();
|
||||
List<T_SK_RISK_IDENTIFY_RESULT_REQUIRE> resultRequires = new List<T_SK_RISK_IDENTIFY_RESULT_REQUIRE>();
|
||||
//List<T_SK_RISK_IDENTIFY_DETAIL_RESULT_MEASURE> resultDetailMes = new List<T_SK_RISK_IDENTIFY_DETAIL_RESULT_MEASURE>();
|
||||
List<T_SK_RISK_IDENTIFY_DETAIL_RESULT_MEASURE> resultDetailMes = new List<T_SK_RISK_IDENTIFY_DETAIL_RESULT_MEASURE>();
|
||||
List<T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST> resultDetailPosts = new List<T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST>();
|
||||
List<T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL> resultDetailPostDets = new List<T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL>();
|
||||
var requre = this.GetEntity<T_SK_REQUEST>(t => !t.IS_DELETED);
|
||||
var users = this.GetEntities<T_FM_USER>(t => t.ENABLE_STATUS == 0 && !t.CODE.Contains("admin"), new BaseFilter(filter.OrgId), "Nav_ApproveRole", "Nav_Person");
|
||||
var departs = this.GetEntities<T_FM_DEPARTMENT>(t => t.ENABLE_STATUS == 0, new BaseFilter(filter.OrgId));
|
||||
@ -1591,68 +1593,60 @@ namespace APT.PP.WebApi.Controllers.Api
|
||||
var i = 1;
|
||||
foreach (var mm in mesTemps)
|
||||
{
|
||||
//T_SK_RISK_IDENTIFY_DETAIL_RESULT_MEASURE mes = new T_SK_RISK_IDENTIFY_DETAIL_RESULT_MEASURE();
|
||||
//mes.ORG_ID = filter.OrgId;
|
||||
//mes.RISK_IDENTIFY_RESULT_DETAIL_ID = ideDetail.ID;
|
||||
//mes.NUM = i;
|
||||
//mes.MEASURE = mm;
|
||||
//resultDetailMes.Add(mes);
|
||||
T_SK_RISK_IDENTIFY_DETAIL_RESULT_MEASURE mes = new T_SK_RISK_IDENTIFY_DETAIL_RESULT_MEASURE();
|
||||
mes.ORG_ID = filter.OrgId;
|
||||
mes.RISK_IDENTIFY_RESULT_DETAIL_ID = ideDetail.ID;
|
||||
mes.NUM = i;
|
||||
mes.MEASURE = mm;
|
||||
resultDetailMes.Add(mes);
|
||||
var mtemp = i + "、" + mm + ";";
|
||||
ideDetail.MEASURE = ideDetail.MEASURE + mtemp;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
//应急处置
|
||||
var emergeTemps = temp.OrderBy(t => t.NUM).Select(m => m.EMERGENCY).Distinct().ToList();
|
||||
if (emergeTemps != null && emergeTemps.Any())
|
||||
{
|
||||
var i = 1;
|
||||
foreach (var mm in emergeTemps)
|
||||
{
|
||||
var mtemp = i + "、" + mm +";";
|
||||
ideDetail.EMERGENCY = ideDetail.EMERGENCY + mtemp;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
ideDetail.EMERGENCY = temp.FirstOrDefault().EMERGENCY;
|
||||
//var emergeTemps = temp.OrderBy(t => t.NUM).Select(m => m.EMERGENCY).Distinct().ToList();
|
||||
//if (emergeTemps != null && emergeTemps.Any())
|
||||
//{
|
||||
// var i = 1;
|
||||
// foreach (var mm in emergeTemps)
|
||||
// {
|
||||
// var mtemp = i + "、" + mm +";";
|
||||
// ideDetail.EMERGENCY = ideDetail.EMERGENCY + mm;
|
||||
// i++;
|
||||
// }
|
||||
//}
|
||||
//辨识部门
|
||||
var identifyIds = temp.Select(t => t.RISK_IDENTIFY_ID).ToList();
|
||||
var departIdss = identityTemps.Where(t => identifyIds.Contains(t.ID)).Select(m => m.APPLY_DEPARTMENT_ID).Distinct().ToList();
|
||||
var userIdss = identityTemps.Where(t => identifyIds.Contains(t.ID)).Select(m => m.APPLY_USER_ID).Distinct().ToList();
|
||||
if (departIdss.Any())
|
||||
{
|
||||
var departTemps = departs.Where(t => departIdss.Contains(t.ID)).Select(m => m.DEPARTMENT_TYPE).Distinct().ToList();
|
||||
var departTemps = departs.Where(t => departIdss.Contains(t.ID)).OrderBy(m=>m.DEPARTMENT_TYPE).ToList();
|
||||
if (departTemps.Any())
|
||||
{
|
||||
var i = 1;
|
||||
foreach (var ite in departTemps)
|
||||
{
|
||||
var departType = "公司级";
|
||||
if (ite == 10)
|
||||
{
|
||||
departType = "部门级";
|
||||
}
|
||||
if (ite == 15)
|
||||
{
|
||||
departType = "车间级";
|
||||
}
|
||||
if (ite == 20)
|
||||
{
|
||||
departType = "班组级";
|
||||
}
|
||||
var temp2 = i == 1 ? i + "、" + departType + ";" : i + "、" + departType + ";";
|
||||
ideDetail.DEPARTMENT_TYPE = ideDetail.DEPARTMENT_TYPE + temp2;
|
||||
var deTemps = departs.Where(t => departIdss.Contains(t.ID) && t.DEPARTMENT_TYPE == ite).Select(m => m.NAME).ToList();
|
||||
var deTempIds = departs.Where(t => departIdss.Contains(t.ID) && t.DEPARTMENT_TYPE == ite).Select(m => m.ID).ToList();
|
||||
var temp3 = i == 1 ? i + "、" + string.Join(",", deTemps) + ";" : i + "、" + string.Join(",", deTemps) + ";";
|
||||
ideDetail.IDENTIFY_DEPARTMENT = ideDetail.IDENTIFY_DEPARTMENT + temp3;
|
||||
var postIdss = users.Where(t => t.DEPARTMENT_ID != null && deTempIds.Contains((Guid)t.DEPARTMENT_ID) && userIdss.Contains(t.ID) && t.Nav_Person != null).ToList();
|
||||
var postIds = postIdss.Where(t => t.Nav_Person != null && t.Nav_Person.POST_ID != null).Select(m => m.Nav_Person.POST_ID).ToList();
|
||||
var postTemps = userPosts.Where(t => postIds.Contains(t.ID)).Select(m => m.NAME).ToList();
|
||||
if (postTemps.Any())
|
||||
{
|
||||
var tempPosts = string.Join(";", postTemps);
|
||||
var temp4 = i == 1 ? i + "、" + tempPosts + ";" : i + "、" + tempPosts + ";";
|
||||
ideDetail.IDENTIFY_POST = ideDetail.IDENTIFY_POST + temp4;
|
||||
T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST depart = new T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST();
|
||||
depart.ORG_ID = ite.ORG_ID;
|
||||
depart.DEPARTMENT_ID = ite.ID;
|
||||
depart.RISK_IDENTIFY_RESULT_DETAIL_ID = ideDetail.ID;
|
||||
depart.DEPARTMENT_TYPE = (SKDepartmentTypeEnum)ite.DEPARTMENT_TYPE;
|
||||
depart.NUM = i;
|
||||
resultDetailPosts.Add(depart);
|
||||
var postIds = users.Where(t => t.DEPARTMENT_ID != null && t.DEPARTMENT_ID == ite.ID && userIdss.Contains(t.ID) && t.Nav_Person != null && t.Nav_Person.POST_ID != null).Select(m=>m.Nav_Person?.POST_ID).ToList();
|
||||
if (postIds.Any())
|
||||
{
|
||||
foreach (var poId in postIds)
|
||||
{
|
||||
T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL poDet = new T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL();
|
||||
poDet.ORG_ID = ite.ORG_ID;
|
||||
poDet.RISK_IDENTIFY_DETAIL_RESULT_POST_ID = depart.ID;
|
||||
poDet.POST_ID = poId;
|
||||
resultDetailPostDets.Add(poDet);
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
@ -1766,72 +1760,64 @@ namespace APT.PP.WebApi.Controllers.Api
|
||||
var i = 1;
|
||||
foreach (var mm in mesTemps)
|
||||
{
|
||||
//T_SK_RISK_IDENTIFY_DETAIL_RESULT_MEASURE mes = new T_SK_RISK_IDENTIFY_DETAIL_RESULT_MEASURE();
|
||||
//mes.ORG_ID = filter.OrgId;
|
||||
//mes.RISK_IDENTIFY_RESULT_DETAIL_ID = ideDetail.ID;
|
||||
//mes.NUM = i;
|
||||
//mes.MEASURE = mm;
|
||||
//resultDetailMes.Add(mes);
|
||||
T_SK_RISK_IDENTIFY_DETAIL_RESULT_MEASURE mes = new T_SK_RISK_IDENTIFY_DETAIL_RESULT_MEASURE();
|
||||
mes.ORG_ID = filter.OrgId;
|
||||
mes.RISK_IDENTIFY_RESULT_DETAIL_ID = ideDetail.ID;
|
||||
mes.NUM = i;
|
||||
mes.MEASURE = mm;
|
||||
resultDetailMes.Add(mes);
|
||||
var mtemp = i + "、" + mm + ";";
|
||||
ideDetail.MEASURE = ideDetail.MEASURE + mtemp;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
//应急处置
|
||||
var emergeTemps = temp.OrderBy(t => t.NUM).Select(m => m.EMERGENCY).Distinct().ToList();
|
||||
if (emergeTemps != null && emergeTemps.Any())
|
||||
{
|
||||
var i = 1;
|
||||
foreach (var mm in emergeTemps)
|
||||
{
|
||||
var mtemp = i + "、" + mm + ";";
|
||||
ideDetail.EMERGENCY = ideDetail.EMERGENCY + mtemp;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
ideDetail.EMERGENCY = temp.FirstOrDefault().EMERGENCY;
|
||||
//var emergeTemps = temp.OrderBy(t => t.NUM).Select(m => m.EMERGENCY).Distinct().ToList();
|
||||
//if (emergeTemps != null && emergeTemps.Any())
|
||||
//{
|
||||
// var i = 1;
|
||||
// foreach (var mm in emergeTemps)
|
||||
// {
|
||||
// var mtemp = i + "、" + mm + ";";
|
||||
// ideDetail.EMERGENCY = ideDetail.EMERGENCY + mtemp;
|
||||
// i++;
|
||||
// }
|
||||
//}
|
||||
//辨识部门
|
||||
var identifyIds = temp.Select(t => t.RISK_IDENTIFY_ID).ToList();
|
||||
var departIdss = identityTemps.Where(t => identifyIds.Contains(t.ID)).Select(m => m.APPLY_DEPARTMENT_ID).Distinct().ToList();
|
||||
var userIdss = identityTemps.Where(t => identifyIds.Contains(t.ID)).Select(m => m.APPLY_USER_ID).Distinct().ToList();
|
||||
if (departIdss.Any())
|
||||
{
|
||||
var departTemps = departs.Where(t => departIdss.Contains(t.ID)).Select(m => m.DEPARTMENT_TYPE).Distinct().ToList();
|
||||
if (departTemps.Any())
|
||||
{
|
||||
var i = 1;
|
||||
foreach (var ite in departTemps)
|
||||
{
|
||||
var departType = "公司级";
|
||||
if (ite == 10)
|
||||
{
|
||||
departType = "部门级";
|
||||
}
|
||||
if (ite == 15)
|
||||
{
|
||||
departType = "车间级";
|
||||
}
|
||||
if (ite == 20)
|
||||
{
|
||||
departType = "班组级";
|
||||
}
|
||||
var temp2 = i == 1 ? i + "、" + departType + ";" : i + "、" + departType + ";";
|
||||
ideDetail.DEPARTMENT_TYPE = ideDetail.DEPARTMENT_TYPE + temp2;
|
||||
var deTemps = departs.Where(t => departIdss.Contains(t.ID) && t.DEPARTMENT_TYPE == ite).Select(m => m.NAME).ToList();
|
||||
var deTempIds = departs.Where(t => departIdss.Contains(t.ID) && t.DEPARTMENT_TYPE == ite).Select(m => m.ID).ToList();
|
||||
var temp3 = i == 1 ? i + "、" + string.Join(",", deTemps) + ";" : i + "、" + string.Join(",", deTemps) + ";" ;
|
||||
ideDetail.IDENTIFY_DEPARTMENT = ideDetail.IDENTIFY_DEPARTMENT + temp3;
|
||||
var postIdss = users.Where(t => t.DEPARTMENT_ID != null && deTempIds.Contains((Guid)t.DEPARTMENT_ID) && userIdss.Contains(t.ID) && t.Nav_Person != null).ToList();
|
||||
var postIds = postIdss.Where(t => t.Nav_Person != null && t.Nav_Person.POST_ID != null).Select(m => m.Nav_Person.POST_ID).ToList();
|
||||
var postTemps = userPosts.Where(t => postIds.Contains(t.ID)).Select(m => m.NAME).ToList();
|
||||
if (postTemps.Any())
|
||||
{
|
||||
var tempPosts = string.Join(";", postTemps);
|
||||
var temp4 = i == 1 ? i + "、" + tempPosts + ";" : i + "、" + tempPosts + ";";
|
||||
ideDetail.IDENTIFY_POST = ideDetail.IDENTIFY_POST + temp4;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
var userIdss = identityTemps.Where(t => identifyIds.Contains(t.ID)).Select(m => m.APPLY_USER_ID).Distinct().ToList();
|
||||
if (departIdss.Any())
|
||||
{
|
||||
var departTemps = departs.Where(t => departIdss.Contains(t.ID)).OrderBy(m => m.DEPARTMENT_TYPE).ToList();
|
||||
if (departTemps.Any())
|
||||
{
|
||||
var i = 1;
|
||||
foreach (var ite in departTemps)
|
||||
{
|
||||
T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST depart = new T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST();
|
||||
depart.ORG_ID = ite.ORG_ID;
|
||||
depart.DEPARTMENT_ID = ite.ID;
|
||||
depart.RISK_IDENTIFY_RESULT_DETAIL_ID = ideDetail.ID;
|
||||
depart.DEPARTMENT_TYPE = (SKDepartmentTypeEnum)ite.DEPARTMENT_TYPE;
|
||||
depart.NUM = i;
|
||||
resultDetailPosts.Add(depart);
|
||||
var postIds = users.Where(t => t.DEPARTMENT_ID != null && t.DEPARTMENT_ID == ite.ID && userIdss.Contains(t.ID) && t.Nav_Person != null && t.Nav_Person.POST_ID != null).Select(m => m.Nav_Person?.POST_ID).ToList();
|
||||
if (postIds.Any())
|
||||
{
|
||||
foreach (var poId in postIds)
|
||||
{
|
||||
T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL poDet = new T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL();
|
||||
poDet.ORG_ID = ite.ORG_ID;
|
||||
poDet.RISK_IDENTIFY_DETAIL_RESULT_POST_ID = depart.ID;
|
||||
poDet.POST_ID = poId;
|
||||
resultDetailPostDets.Add(poDet);
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
resultDetails.Add(ideDetail);
|
||||
}
|
||||
@ -1969,72 +1955,64 @@ namespace APT.PP.WebApi.Controllers.Api
|
||||
var i = 1;
|
||||
foreach (var mm in mesTemps)
|
||||
{
|
||||
//T_SK_RISK_IDENTIFY_DETAIL_RESULT_MEASURE mes = new T_SK_RISK_IDENTIFY_DETAIL_RESULT_MEASURE();
|
||||
//mes.ORG_ID = filter.OrgId;
|
||||
//mes.RISK_IDENTIFY_RESULT_DETAIL_ID = ideDetail.ID;
|
||||
//mes.NUM = i;
|
||||
//mes.MEASURE = mm;
|
||||
//resultDetailMes.Add(mes);
|
||||
T_SK_RISK_IDENTIFY_DETAIL_RESULT_MEASURE mes = new T_SK_RISK_IDENTIFY_DETAIL_RESULT_MEASURE();
|
||||
mes.ORG_ID = filter.OrgId;
|
||||
mes.RISK_IDENTIFY_RESULT_DETAIL_ID = ideDetail.ID;
|
||||
mes.NUM = i;
|
||||
mes.MEASURE = mm;
|
||||
resultDetailMes.Add(mes);
|
||||
var mtemp = i + "、" + mm + ";";
|
||||
ideDetail.MEASURE = ideDetail.MEASURE + mtemp;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
//应急处置
|
||||
var emergeTemps = temp.OrderBy(t => t.NUM).Select(m => m.EMERGENCY).Distinct().ToList();
|
||||
if (emergeTemps != null && emergeTemps.Any())
|
||||
{
|
||||
var i = 1;
|
||||
foreach (var mm in emergeTemps)
|
||||
{
|
||||
var mtemp = i + "、" + mm + ";";
|
||||
ideDetail.EMERGENCY = ideDetail.EMERGENCY + mtemp;
|
||||
i++;
|
||||
}
|
||||
}
|
||||
ideDetail.EMERGENCY = temp.FirstOrDefault().EMERGENCY;
|
||||
//var emergeTemps = temp.OrderBy(t => t.NUM).Select(m => m.EMERGENCY).Distinct().ToList();
|
||||
//if (emergeTemps != null && emergeTemps.Any())
|
||||
//{
|
||||
// var i = 1;
|
||||
// foreach (var mm in emergeTemps)
|
||||
// {
|
||||
// var mtemp = i + "、" + mm + ";";
|
||||
// ideDetail.EMERGENCY = ideDetail.EMERGENCY + mtemp;
|
||||
// i++;
|
||||
// }
|
||||
//}
|
||||
//辨识部门
|
||||
var identifyIds = temp.Select(t => t.RISK_IDENTIFY_ID).ToList();
|
||||
var departIdss = identityTemps.Where(t => identifyIds.Contains(t.ID)).Select(m => m.APPLY_DEPARTMENT_ID).Distinct().ToList();
|
||||
var userIdss = identityTemps.Where(t => identifyIds.Contains(t.ID)).Select(m => m.APPLY_USER_ID).Distinct().ToList();
|
||||
if (departIdss.Any())
|
||||
{
|
||||
var departTemps = departs.Where(t => departIdss.Contains(t.ID)).Select(m => m.DEPARTMENT_TYPE).Distinct().ToList();
|
||||
if (departTemps.Any())
|
||||
{
|
||||
var i = 1;
|
||||
foreach (var ite in departTemps)
|
||||
{
|
||||
var departType = "公司级";
|
||||
if (ite == 10)
|
||||
{
|
||||
departType = "部门级";
|
||||
}
|
||||
if (ite == 15)
|
||||
{
|
||||
departType = "车间级";
|
||||
}
|
||||
if (ite == 20)
|
||||
{
|
||||
departType = "班组级";
|
||||
}
|
||||
var temp2 = i == 1 ? i + "、" + departType + ";" : i + "、" + departType + ";";
|
||||
ideDetail.DEPARTMENT_TYPE = ideDetail.DEPARTMENT_TYPE + temp2;
|
||||
var deTemps = departs.Where(t => departIdss.Contains(t.ID) && t.DEPARTMENT_TYPE == ite).Select(m => m.NAME).ToList();
|
||||
var deTempIds = departs.Where(t => departIdss.Contains(t.ID) && t.DEPARTMENT_TYPE == ite).Select(m => m.ID).ToList();
|
||||
var temp3 = i == 1 ? i + "、" + string.Join(",", deTemps) + ";" : i + "、" + string.Join(",", deTemps) + ";";
|
||||
ideDetail.IDENTIFY_DEPARTMENT = ideDetail.IDENTIFY_DEPARTMENT + temp3;
|
||||
var postIdss = users.Where(t => t.DEPARTMENT_ID != null && deTempIds.Contains((Guid)t.DEPARTMENT_ID) && userIdss.Contains(t.ID) && t.Nav_Person != null).ToList();
|
||||
var postIds = postIdss.Where(t => t.Nav_Person != null && t.Nav_Person.POST_ID != null).Select(m => m.Nav_Person.POST_ID).ToList();
|
||||
var postTemps = userPosts.Where(t => postIds.Contains(t.ID)).Select(m => m.NAME).ToList();
|
||||
if (postTemps.Any())
|
||||
{
|
||||
var tempPosts = string.Join(";", postTemps);
|
||||
var temp4 = i == 1 ? i + "、" + tempPosts + ";" : i + "、" + tempPosts + ";";
|
||||
ideDetail.IDENTIFY_POST = ideDetail.IDENTIFY_POST + temp4;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
if (departIdss.Any())
|
||||
{
|
||||
var departTemps = departs.Where(t => departIdss.Contains(t.ID)).OrderBy(m => m.DEPARTMENT_TYPE).ToList();
|
||||
if (departTemps.Any())
|
||||
{
|
||||
var i = 1;
|
||||
foreach (var ite in departTemps)
|
||||
{
|
||||
T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST depart = new T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST();
|
||||
depart.ORG_ID = ite.ORG_ID;
|
||||
depart.DEPARTMENT_ID = ite.ID;
|
||||
depart.RISK_IDENTIFY_RESULT_DETAIL_ID = ideDetail.ID;
|
||||
depart.DEPARTMENT_TYPE = (SKDepartmentTypeEnum)ite.DEPARTMENT_TYPE;
|
||||
depart.NUM = i;
|
||||
resultDetailPosts.Add(depart);
|
||||
var postIds = users.Where(t => t.DEPARTMENT_ID != null && t.DEPARTMENT_ID == ite.ID && userIdss.Contains(t.ID) && t.Nav_Person != null && t.Nav_Person.POST_ID != null).Select(m => m.Nav_Person?.POST_ID).ToList();
|
||||
if (postIds.Any())
|
||||
{
|
||||
foreach (var poId in postIds)
|
||||
{
|
||||
T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL poDet = new T_SK_RISK_IDENTIFY_DETAIL_RESULT_POST_DETAIL();
|
||||
poDet.ORG_ID = ite.ORG_ID;
|
||||
poDet.RISK_IDENTIFY_DETAIL_RESULT_POST_ID = depart.ID;
|
||||
poDet.POST_ID = poId;
|
||||
resultDetailPostDets.Add(poDet);
|
||||
}
|
||||
}
|
||||
i++;
|
||||
}
|
||||
}
|
||||
}
|
||||
resultDetails.Add(ideDetail);
|
||||
}
|
||||
@ -2070,8 +2048,12 @@ namespace APT.PP.WebApi.Controllers.Api
|
||||
BantchSaveEntityNoCommit(resultDetails);
|
||||
if (resultRequires != null && resultRequires.Any())
|
||||
BantchSaveEntityNoCommit(resultRequires);
|
||||
//if (resultDetailMes != null && resultDetailMes.Any())
|
||||
// BantchSaveEntityNoCommit(resultDetailMes);
|
||||
if (resultDetailMes != null && resultDetailMes.Any())
|
||||
BantchSaveEntityNoCommit(resultDetailMes);
|
||||
if (resultDetailPosts != null && resultDetailPosts.Any())
|
||||
BantchSaveEntityNoCommit(resultDetailPosts);
|
||||
if (resultDetailPostDets != null && resultDetailPostDets.Any())
|
||||
BantchSaveEntityNoCommit(resultDetailPostDets);
|
||||
});
|
||||
}
|
||||
catch (Exception ex)
|
||||
|
||||
@ -1,7 +1,13 @@
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
//------------------------------------------------------------------------------
|
||||
// T4模板文件:基础接口类
|
||||
// 此代码由T4模板自动生成
|
||||
@ -15,4 +21,5 @@ using APT.Infrastructure.Api;
|
||||
using APT.BaseData.Domain.ApiModel.PF;
|
||||
namespace APT.PP.WebApi.Controllers.Api
|
||||
{
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
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