隐患待上报 附件 默认加载安全检查附件
应急演练活动记录 添加应急预案 附件 应急演练计划 明细 删除字段【关联应急预案】 应急装备需求调查表 修改结束时间大于开始时间的提示
This commit is contained in:
parent
68fc13ccdf
commit
c19682a0c5
61924
APT.Data.Migrations/Migrations/20240424004956_wyw2024042401.Designer.cs
generated
Normal file
61924
APT.Data.Migrations/Migrations/20240424004956_wyw2024042401.Designer.cs
generated
Normal file
File diff suppressed because it is too large
Load Diff
126
APT.Data.Migrations/Migrations/20240424004956_wyw2024042401.cs
Normal file
126
APT.Data.Migrations/Migrations/20240424004956_wyw2024042401.cs
Normal file
@ -0,0 +1,126 @@
|
||||
using System;
|
||||
using Microsoft.EntityFrameworkCore.Migrations;
|
||||
|
||||
namespace APT.Data.Migrations.Migrations
|
||||
{
|
||||
public partial class wyw2024042401 : Migration
|
||||
{
|
||||
protected override void Up(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_T_CM_DRILL_PLAN_STANDARD_CREATE_T_CM_DRILL_PLAN_DETAIL_PLAN_ID",
|
||||
table: "T_CM_DRILL_PLAN_STANDARD_CREATE");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_T_CM_DRILL_PLAN_STANDARD_CREATE_PLAN_ID",
|
||||
table: "T_CM_DRILL_PLAN_STANDARD_CREATE");
|
||||
|
||||
migrationBuilder.AddColumn<Guid>(
|
||||
name: "Nav_PlanID",
|
||||
table: "T_CM_DRILL_PLAN_STANDARD_CREATE",
|
||||
type: "uniqueidentifier",
|
||||
nullable: true);
|
||||
|
||||
migrationBuilder.CreateTable(
|
||||
name: "T_CM_DRILL_RECORD_STANDER_FILE",
|
||||
columns: table => new
|
||||
{
|
||||
ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
RECORD_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
IMG_FILE_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
IS_DELETED = table.Column<bool>(type: "bit", nullable: false),
|
||||
ORG_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: false),
|
||||
ENTITY_ORG_TPYE = table.Column<int>(type: "int", nullable: false),
|
||||
FORM_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
FLOW_STATUS = table.Column<int>(type: "int", nullable: false),
|
||||
FLOW_SEND_STATUS = table.Column<int>(type: "int", nullable: false),
|
||||
FLOW_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
CREATE_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
MODIFY_TIME = table.Column<DateTime>(type: "datetime2", nullable: true),
|
||||
CREATER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true),
|
||||
MODIFIER_ID = table.Column<Guid>(type: "uniqueidentifier", nullable: true)
|
||||
},
|
||||
constraints: table =>
|
||||
{
|
||||
table.PrimaryKey("PK_T_CM_DRILL_RECORD_STANDER_FILE", x => x.ID);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_CM_DRILL_RECORD_STANDER_FILE_T_CM_DRILL_RECORD_RECORD_ID",
|
||||
column: x => x.RECORD_ID,
|
||||
principalTable: "T_CM_DRILL_RECORD",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_CM_DRILL_RECORD_STANDER_FILE_T_FM_ORGANIZATION_ORG_ID",
|
||||
column: x => x.ORG_ID,
|
||||
principalTable: "T_FM_ORGANIZATION",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
table.ForeignKey(
|
||||
name: "FK_T_CM_DRILL_RECORD_STANDER_FILE_T_PF_IMG_FILE_IMG_FILE_ID",
|
||||
column: x => x.IMG_FILE_ID,
|
||||
principalTable: "T_PF_IMG_FILE",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
});
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_CM_DRILL_PLAN_STANDARD_CREATE_Nav_PlanID",
|
||||
table: "T_CM_DRILL_PLAN_STANDARD_CREATE",
|
||||
column: "Nav_PlanID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_CM_DRILL_RECORD_STANDER_FILE_IMG_FILE_ID",
|
||||
table: "T_CM_DRILL_RECORD_STANDER_FILE",
|
||||
column: "IMG_FILE_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_CM_DRILL_RECORD_STANDER_FILE_ORG_ID",
|
||||
table: "T_CM_DRILL_RECORD_STANDER_FILE",
|
||||
column: "ORG_ID");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_CM_DRILL_RECORD_STANDER_FILE_RECORD_ID",
|
||||
table: "T_CM_DRILL_RECORD_STANDER_FILE",
|
||||
column: "RECORD_ID");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_T_CM_DRILL_PLAN_STANDARD_CREATE_T_CM_DRILL_PLAN_DETAIL_Nav_PlanID",
|
||||
table: "T_CM_DRILL_PLAN_STANDARD_CREATE",
|
||||
column: "Nav_PlanID",
|
||||
principalTable: "T_CM_DRILL_PLAN_DETAIL",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
|
||||
protected override void Down(MigrationBuilder migrationBuilder)
|
||||
{
|
||||
migrationBuilder.DropForeignKey(
|
||||
name: "FK_T_CM_DRILL_PLAN_STANDARD_CREATE_T_CM_DRILL_PLAN_DETAIL_Nav_PlanID",
|
||||
table: "T_CM_DRILL_PLAN_STANDARD_CREATE");
|
||||
|
||||
migrationBuilder.DropTable(
|
||||
name: "T_CM_DRILL_RECORD_STANDER_FILE");
|
||||
|
||||
migrationBuilder.DropIndex(
|
||||
name: "IX_T_CM_DRILL_PLAN_STANDARD_CREATE_Nav_PlanID",
|
||||
table: "T_CM_DRILL_PLAN_STANDARD_CREATE");
|
||||
|
||||
migrationBuilder.DropColumn(
|
||||
name: "Nav_PlanID",
|
||||
table: "T_CM_DRILL_PLAN_STANDARD_CREATE");
|
||||
|
||||
migrationBuilder.CreateIndex(
|
||||
name: "IX_T_CM_DRILL_PLAN_STANDARD_CREATE_PLAN_ID",
|
||||
table: "T_CM_DRILL_PLAN_STANDARD_CREATE",
|
||||
column: "PLAN_ID");
|
||||
|
||||
migrationBuilder.AddForeignKey(
|
||||
name: "FK_T_CM_DRILL_PLAN_STANDARD_CREATE_T_CM_DRILL_PLAN_DETAIL_PLAN_ID",
|
||||
table: "T_CM_DRILL_PLAN_STANDARD_CREATE",
|
||||
column: "PLAN_ID",
|
||||
principalTable: "T_CM_DRILL_PLAN_DETAIL",
|
||||
principalColumn: "ID",
|
||||
onDelete: ReferentialAction.Restrict);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -22956,6 +22956,9 @@ namespace APT.Data.Migrations.Migrations
|
||||
b.Property<DateTime?>("MODIFY_TIME")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid?>("Nav_PlanID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("ORG_ID")
|
||||
.IsRequired()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
@ -22968,9 +22971,9 @@ namespace APT.Data.Migrations.Migrations
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("ORG_ID");
|
||||
b.HasIndex("Nav_PlanID");
|
||||
|
||||
b.HasIndex("PLAN_ID");
|
||||
b.HasIndex("ORG_ID");
|
||||
|
||||
b.HasIndex("STANDARD_CREATE_ID");
|
||||
|
||||
@ -23196,6 +23199,63 @@ namespace APT.Data.Migrations.Migrations
|
||||
b.ToTable("T_CM_DRILL_RECORD_FILE");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_RECORD_STANDER_FILE", b =>
|
||||
{
|
||||
b.Property<Guid>("ID")
|
||||
.ValueGeneratedOnAdd()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid?>("CREATER_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime?>("CREATE_TIME")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<int>("ENTITY_ORG_TPYE")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid?>("FLOW_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<int>("FLOW_SEND_STATUS")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<int>("FLOW_STATUS")
|
||||
.HasColumnType("int");
|
||||
|
||||
b.Property<Guid?>("FORM_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("IMG_FILE_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<bool>("IS_DELETED")
|
||||
.HasColumnType("bit");
|
||||
|
||||
b.Property<Guid?>("MODIFIER_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<DateTime?>("MODIFY_TIME")
|
||||
.HasColumnType("datetime2");
|
||||
|
||||
b.Property<Guid?>("ORG_ID")
|
||||
.IsRequired()
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.Property<Guid>("RECORD_ID")
|
||||
.HasColumnType("uniqueidentifier");
|
||||
|
||||
b.HasKey("ID");
|
||||
|
||||
b.HasIndex("IMG_FILE_ID");
|
||||
|
||||
b.HasIndex("ORG_ID");
|
||||
|
||||
b.HasIndex("RECORD_ID");
|
||||
|
||||
b.ToTable("T_CM_DRILL_RECORD_STANDER_FILE");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_RECORD_SUMMARY_FILE", b =>
|
||||
{
|
||||
b.Property<Guid>("ID")
|
||||
@ -51931,18 +51991,16 @@ namespace APT.Data.Migrations.Migrations
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_PLAN_STANDARD_CREATE", b =>
|
||||
{
|
||||
b.HasOne("APT.MS.Domain.Entities.CM.T_CM_DRILL_PLAN_DETAIL", "Nav_Plan")
|
||||
.WithMany()
|
||||
.HasForeignKey("Nav_PlanID");
|
||||
|
||||
b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
|
||||
.WithMany()
|
||||
.HasForeignKey("ORG_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("APT.MS.Domain.Entities.CM.T_CM_DRILL_PLAN_DETAIL", "Nav_Plan")
|
||||
.WithMany("Nav_ListStandard")
|
||||
.HasForeignKey("PLAN_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("APT.MS.Domain.Entities.SC.SC.T_SC_STANDARD_CREATE", "Nav_StandardCreate")
|
||||
.WithMany()
|
||||
.HasForeignKey("STANDARD_CREATE_ID")
|
||||
@ -52055,6 +52113,33 @@ namespace APT.Data.Migrations.Migrations
|
||||
b.Navigation("Nav_Record");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_RECORD_STANDER_FILE", b =>
|
||||
{
|
||||
b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
|
||||
.WithMany()
|
||||
.HasForeignKey("IMG_FILE_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("APT.Infrastructure.Core.T_FM_ORGANIZATION", "Nav_Org")
|
||||
.WithMany()
|
||||
.HasForeignKey("ORG_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.HasOne("APT.MS.Domain.Entities.CM.T_CM_DRILL_RECORD", "Nav_Record")
|
||||
.WithMany("Nav_FilesStander")
|
||||
.HasForeignKey("RECORD_ID")
|
||||
.OnDelete(DeleteBehavior.Restrict)
|
||||
.IsRequired();
|
||||
|
||||
b.Navigation("Nav_ImgFile");
|
||||
|
||||
b.Navigation("Nav_Org");
|
||||
|
||||
b.Navigation("Nav_Record");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_RECORD_SUMMARY_FILE", b =>
|
||||
{
|
||||
b.HasOne("APT.BaseData.Domain.Entities.T_PF_IMG_FILE", "Nav_ImgFile")
|
||||
@ -61127,15 +61212,12 @@ namespace APT.Data.Migrations.Migrations
|
||||
b.Navigation("Nav_listPlanDetail");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_PLAN_DETAIL", b =>
|
||||
{
|
||||
b.Navigation("Nav_ListStandard");
|
||||
});
|
||||
|
||||
modelBuilder.Entity("APT.MS.Domain.Entities.CM.T_CM_DRILL_RECORD", b =>
|
||||
{
|
||||
b.Navigation("Nav_FilesRecord");
|
||||
|
||||
b.Navigation("Nav_FilesStander");
|
||||
|
||||
b.Navigation("Nav_FilesSummary");
|
||||
|
||||
b.Navigation("Nav_ListDepartment");
|
||||
|
||||
@ -3739,8 +3739,7 @@ builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USER_ID).OnDelet
|
||||
public override void Configure(EntityTypeBuilder<T_CM_DRILL_PLAN_STANDARD_CREATE> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_Plan).WithMany(t=>t.Nav_ListStandard).HasForeignKey(t => t.PLAN_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_StandardCreate).WithMany().HasForeignKey(t => t.STANDARD_CREATE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_StandardCreate).WithMany().HasForeignKey(t => t.STANDARD_CREATE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
@ -3782,6 +3781,17 @@ builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENT
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_Record).WithMany(t=>t.Nav_FilesRecord).HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
#endregion
|
||||
#region DrillRecordStanderFile
|
||||
public partial class CMDrillRecordStanderFileMap :APTEntityBaseMap<T_CM_DRILL_RECORD_STANDER_FILE>
|
||||
{
|
||||
public override void Configure(EntityTypeBuilder<T_CM_DRILL_RECORD_STANDER_FILE> builder)
|
||||
{
|
||||
base.Configure(builder);
|
||||
builder.HasOne(t => t.Nav_Record).WithMany(t=>t.Nav_FilesStander).HasForeignKey(t => t.RECORD_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
builder.HasOne(t => t.Nav_ImgFile).WithMany().HasForeignKey(t => t.IMG_FILE_ID).OnDelete(DeleteBehavior.Restrict);
|
||||
}
|
||||
}
|
||||
|
||||
@ -56,12 +56,6 @@ namespace APT.MS.Domain.Entities.CM
|
||||
[Description("应急演练名称")]
|
||||
public T_CM_DRILL_NAME Nav_Name { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 导航属性:关联应急预案
|
||||
/// </summary>
|
||||
[Description("导航属性:关联应急预案")]
|
||||
public virtual ICollection<T_CM_DRILL_PLAN_STANDARD_CREATE> Nav_ListStandard { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 演练部门ID
|
||||
/// </summary>
|
||||
|
||||
@ -21,7 +21,6 @@ namespace APT.MS.Domain.Entities.CM
|
||||
/// 应急演练计划编号
|
||||
/// </summary>
|
||||
[Description("应急演练计划编号")]
|
||||
[DataFieldForeignKey("Nav_Plan", "Nav_ListStandard")]
|
||||
public Guid PLAN_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
@ -202,5 +202,12 @@ namespace APT.MS.Domain.Entities.CM
|
||||
/// </summary>
|
||||
[Description("生成方式")]
|
||||
public CREACTTYPEEnum CREACTTYPE { get; set; } = 0;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 应急预案 SMS要 SPS 不要
|
||||
/// </summary>
|
||||
[Description("应急预案")]
|
||||
public virtual ICollection<T_CM_DRILL_RECORD_STANDER_FILE> Nav_FilesStander { get; set; }
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,42 @@
|
||||
using APT.BaseData.Domain.Entities;
|
||||
using APT.Infrastructure.Core;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.ComponentModel;
|
||||
|
||||
namespace APT.MS.Domain.Entities.CM
|
||||
{
|
||||
/// <summary>
|
||||
/// 导航属性:应急预案(去除了 标准化创建(演练计划))
|
||||
/// </summary>
|
||||
[Description("应急预案")]
|
||||
public class T_CM_DRILL_RECORD_STANDER_FILE : MesEntityBase
|
||||
{
|
||||
/// <summary>
|
||||
/// 应急演练记录编号
|
||||
/// </summary>
|
||||
[Description("应急演练记录编号")]
|
||||
[DataFieldForeignKey("Nav_Record", "Nav_FilesStander")]
|
||||
public Guid RECORD_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 导航属性:应急演练记录
|
||||
/// </summary>
|
||||
[Description("导航属性:应急演练记录")]
|
||||
public virtual T_CM_DRILL_RECORD Nav_Record { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 文件ID
|
||||
/// </summary>
|
||||
[Description("文件")]
|
||||
[DataFieldForeignKey("Nav_ImgFile")]
|
||||
public Guid IMG_FILE_ID { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 导航属性:文件
|
||||
/// </summary>
|
||||
[Description("导航属性:文件")]
|
||||
public virtual T_PF_IMG_FILE Nav_ImgFile { get; set; }
|
||||
}
|
||||
}
|
||||
@ -126,6 +126,24 @@ namespace APT.BS.WebApi.Controllers.Api
|
||||
modelSub.CHECK_TYPE_LEVEL_ID = entity.CHECK_TYPE_LEVEL_ID;
|
||||
modelSub.ORG_ID = entity.ORG_ID;
|
||||
|
||||
|
||||
var files = GetEntities<T_BS_SAFE_CHECK_FILE>(e => e.SAFE_CHECK_ID == guid, null, "Nav_ImgFile.Nav_File");
|
||||
if (files != null && files.Any())
|
||||
{
|
||||
var Nav_Files = new List<T_BS_RISK_SUBMIT_FILE>();
|
||||
foreach (var item in files)
|
||||
{
|
||||
Nav_Files.Add(new T_BS_RISK_SUBMIT_FILE()
|
||||
{
|
||||
ID = Guid.NewGuid(),
|
||||
ORG_ID = modelSub.ORG_ID,
|
||||
RISK_SUBMIT_ID = modelSub.ID,
|
||||
IMG_FILE_ID = item.IMG_FILE_ID,
|
||||
Nav_ImgFile = item.Nav_ImgFile
|
||||
});
|
||||
}
|
||||
modelSub.Nav_Files = Nav_Files;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -5090,7 +5108,13 @@ namespace APT.BS.WebApi.Controllers.Api
|
||||
|
||||
var files = entity.Nav_Files;
|
||||
entity.Nav_Files = null;
|
||||
|
||||
if (files != null && files.Any())
|
||||
{
|
||||
foreach (var item in files)
|
||||
{
|
||||
item.Nav_ImgFile = null;
|
||||
}
|
||||
}
|
||||
//附件
|
||||
List<T_BS_RISK_SUBMIT_CONTENT_FILE> listContentFile = new List<T_BS_RISK_SUBMIT_CONTENT_FILE>();
|
||||
|
||||
|
||||
@ -45,18 +45,18 @@ namespace APT.SC.WebApi.Controllers.Api.CM
|
||||
var listPlanDetail = entity.Nav_listPlanDetail;
|
||||
entity.Nav_listPlanDetail = null;
|
||||
|
||||
List<T_CM_DRILL_PLAN_STANDARD_CREATE> listFiles = null;
|
||||
foreach (var item in listPlanDetail)
|
||||
{
|
||||
if (item.Nav_ListStandard != null && item.Nav_ListStandard.Any())
|
||||
{
|
||||
if (listFiles == null)
|
||||
{
|
||||
listFiles = new List<T_CM_DRILL_PLAN_STANDARD_CREATE>();
|
||||
}
|
||||
listFiles.AddRange(item.Nav_ListStandard);
|
||||
}
|
||||
}
|
||||
//List<T_CM_DRILL_PLAN_STANDARD_CREATE> listFiles = null;
|
||||
//foreach (var item in listPlanDetail)
|
||||
//{
|
||||
// if (item.Nav_ListStandard != null && item.Nav_ListStandard.Any())
|
||||
// {
|
||||
// if (listFiles == null)
|
||||
// {
|
||||
// listFiles = new List<T_CM_DRILL_PLAN_STANDARD_CREATE>();
|
||||
// }
|
||||
// listFiles.AddRange(item.Nav_ListStandard);
|
||||
// }
|
||||
//}
|
||||
|
||||
if (!entity.DEPARTMENT_ID.HasValue)
|
||||
{
|
||||
@ -77,8 +77,8 @@ namespace APT.SC.WebApi.Controllers.Api.CM
|
||||
UpdateEntityNoCommit(entity);
|
||||
if (listPlanDetail != null && listPlanDetail.Any())//明细
|
||||
BantchSaveEntityNoCommit(listPlanDetail);
|
||||
if (listFiles != null && listFiles.Any())//关联应急预案
|
||||
BantchSaveEntityNoCommit(listFiles);
|
||||
//if (listFiles != null && listFiles.Any())//关联应急预案
|
||||
// BantchSaveEntityNoCommit(listFiles);
|
||||
});
|
||||
}
|
||||
else
|
||||
@ -141,8 +141,8 @@ namespace APT.SC.WebApi.Controllers.Api.CM
|
||||
UpdateEntityNoCommit(taskEnd);
|
||||
if (listPlanDetail != null && listPlanDetail.Any())//明细
|
||||
BantchSaveEntityNoCommit(listPlanDetail);
|
||||
if (listFiles != null && listFiles.Any())//关联应急预案
|
||||
BantchSaveEntityNoCommit(listFiles);
|
||||
//if (listFiles != null && listFiles.Any())//关联应急预案
|
||||
// BantchSaveEntityNoCommit(listFiles);
|
||||
}, entity.APPROVE_ID, null, null, null, null, "CM002_SHOWPRINT", null, "年度应急演练计划审批");
|
||||
}
|
||||
|
||||
|
||||
@ -19,7 +19,7 @@ namespace APT.SC.WebApi.Controllers.Api.CM
|
||||
IPFApproveCallBackService ApproveCallBackService { get; set; }
|
||||
IFMNotificationTaskService NotificationTaskService { get; set; }
|
||||
IFMUserService UserService { get; set; }
|
||||
public CMDrillRecordController(IFMFlowPermitService mFlowPermitService, IPFApproveCallBackService approveCallBackService, IFMNotificationTaskService notificationTaskService, IFMUserService userService)
|
||||
public CMDrillRecordController(IFMFlowPermitService mFlowPermitService, IPFApproveCallBackService approveCallBackService, IFMNotificationTaskService notificationTaskService, IFMUserService userService)
|
||||
{
|
||||
MFlowPermitService = mFlowPermitService;
|
||||
ApproveCallBackService = approveCallBackService;
|
||||
@ -47,6 +47,9 @@ namespace APT.SC.WebApi.Controllers.Api.CM
|
||||
entity.Nav_FilesSummary = null;
|
||||
var FilesRecord = entity.Nav_FilesRecord;
|
||||
entity.Nav_FilesRecord = null;
|
||||
var FilesStander = entity.Nav_FilesStander;
|
||||
entity.Nav_FilesStander = null;
|
||||
|
||||
if (ListUser != null && ListUser.Any())
|
||||
{
|
||||
ListUser.ToList()[0].ISSIGN = true;//第一个人为填表人
|
||||
@ -86,6 +89,8 @@ namespace APT.SC.WebApi.Controllers.Api.CM
|
||||
BantchSaveEntityNoCommit(FilesSummary);
|
||||
if (FilesRecord != null && FilesRecord.Any())//演练活动记录
|
||||
BantchSaveEntityNoCommit(FilesRecord);
|
||||
if (FilesStander != null && FilesStander.Any())//演练活动记录
|
||||
BantchSaveEntityNoCommit(FilesStander);
|
||||
});
|
||||
}
|
||||
else
|
||||
@ -123,6 +128,8 @@ namespace APT.SC.WebApi.Controllers.Api.CM
|
||||
BantchSaveEntityNoCommit(FilesSummary);
|
||||
if (FilesRecord != null && FilesRecord.Any())//演练活动记录
|
||||
BantchSaveEntityNoCommit(FilesRecord);
|
||||
if (FilesStander != null && FilesStander.Any())//演练活动记录
|
||||
BantchSaveEntityNoCommit(FilesStander);
|
||||
}, entity.APPROVE_ID, null, null, null, null, "CM034_SHOWPRINT", null, "应急演练活动记录审批");
|
||||
}
|
||||
return true;
|
||||
|
||||
@ -51,7 +51,7 @@ namespace APT.SC.WebApi.Controllers.Api.CM
|
||||
}
|
||||
if (entity.START_TIME > entity.END_TIME)
|
||||
{
|
||||
throw new Exception("截止时间不能小于发起时间!");
|
||||
throw new Exception("截止时间不能小于发起时间!请联系管理员查看配置的准确性:统管理 > 应急管理配置 > 自动触发日期配置 【应急装备需求调查结束日期】要大于【应急装备需求调查触发日期】");
|
||||
}
|
||||
if (entity.Nav_ListDetail == null || !entity.Nav_ListDetail.Any())
|
||||
{
|
||||
|
||||
@ -4641,6 +4641,111 @@ using APT.MS.Domain.Entities.SE;
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
#region DrillRecordStanderFile-应急预案
|
||||
/// <summary>
|
||||
/// 应急预案
|
||||
/// </summary>
|
||||
[Route("api/CM/DrillRecordStanderFile")]
|
||||
public partial class DrillRecordStanderFileController : AuthorizeApiController<T_CM_DRILL_RECORD_STANDER_FILE>
|
||||
{
|
||||
/// <summary>
|
||||
/// 查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Entities")]
|
||||
public JsonActionResult<IEnumerable<T_CM_DRILL_RECORD_STANDER_FILE>> Entities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitEntities(null, filter);
|
||||
}
|
||||
/// <summary>
|
||||
/// 排序查询所有数据
|
||||
/// </summary>
|
||||
/// <param name="filter">过滤实体</param>
|
||||
/// <returns></returns>
|
||||
|
||||
[HttpPost, Route("OrderEntities")]
|
||||
public JsonActionResult<IEnumerable<T_CM_DRILL_RECORD_STANDER_FILE>> OrderEntities([FromBody]KeywordFilter filter)
|
||||
{
|
||||
return WitOrderEntities(null, filter);
|
||||
}
|
||||
/// <summary>
|
||||
/// 分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("Paged")]
|
||||
public PagedActionResult<T_CM_DRILL_RECORD_STANDER_FILE> Paged([FromBody]KeywordPageFilter pageFilter)
|
||||
{
|
||||
return WitPaged(null, pageFilter);
|
||||
}
|
||||
/// <summary>
|
||||
/// 排序分页查询数据
|
||||
/// </summary>
|
||||
/// <param name="pageFilter">分页过滤实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("OrderPaged")]
|
||||
public PagedActionResult<T_CM_DRILL_RECORD_STANDER_FILE> 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_CM_DRILL_RECORD_STANDER_FILE entity)
|
||||
{
|
||||
return WitUpdate(entity);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// 批量更新
|
||||
/// </summary>
|
||||
/// <param name="entity">对象实体</param>
|
||||
/// <returns></returns>
|
||||
[HttpPost, Route("BatchUpdate")]
|
||||
public JsonActionResult<bool> BatchUpdate([FromBody] BatchUpdateModel<T_CM_DRILL_RECORD_STANDER_FILE> 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_CM_DRILL_RECORD_STANDER_FILE> Get([FromBody] KeywordFilter filter)
|
||||
{
|
||||
return WitEntity(null, filter);
|
||||
}
|
||||
|
||||
}
|
||||
#endregion
|
||||
#region DrillRecordSummaryFile-导航属性:演练记录报告文件
|
||||
|
||||
Loading…
Reference in New Issue
Block a user