检查表 上报表 添加 取消人 取消原因 是否取消 字段

检查制定取消  取消原因入库(修改原有方法)
This commit is contained in:
wyw 2024-08-05 16:12:41 +08:00
parent 29eab54b35
commit 89a3118bce
7 changed files with 62105 additions and 1 deletions

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,78 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
namespace APT.Data.Migrations.Migrations
{
public partial class wyw2024080501 : Migration
{
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AddColumn<bool>(
name: "IS_CANCEL",
table: "T_BS_SAFE_CHECK",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<string>(
name: "REMARK_CANCEL",
table: "T_BS_SAFE_CHECK",
type: "nvarchar(500)",
maxLength: 500,
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "USER_ID_CANCEL",
table: "T_BS_SAFE_CHECK",
type: "uniqueidentifier",
nullable: true);
migrationBuilder.AddColumn<bool>(
name: "IS_CANCEL",
table: "T_BS_RISK_SUBMIT",
type: "bit",
nullable: false,
defaultValue: false);
migrationBuilder.AddColumn<string>(
name: "REMARK_CANCEL",
table: "T_BS_RISK_SUBMIT",
type: "nvarchar(500)",
maxLength: 500,
nullable: true);
migrationBuilder.AddColumn<Guid>(
name: "USER_ID_CANCEL",
table: "T_BS_RISK_SUBMIT",
type: "uniqueidentifier",
nullable: true);
}
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropColumn(
name: "IS_CANCEL",
table: "T_BS_SAFE_CHECK");
migrationBuilder.DropColumn(
name: "REMARK_CANCEL",
table: "T_BS_SAFE_CHECK");
migrationBuilder.DropColumn(
name: "USER_ID_CANCEL",
table: "T_BS_SAFE_CHECK");
migrationBuilder.DropColumn(
name: "IS_CANCEL",
table: "T_BS_RISK_SUBMIT");
migrationBuilder.DropColumn(
name: "REMARK_CANCEL",
table: "T_BS_RISK_SUBMIT");
migrationBuilder.DropColumn(
name: "USER_ID_CANCEL",
table: "T_BS_RISK_SUBMIT");
}
}
}

View File

@ -4873,6 +4873,9 @@ namespace APT.Data.Migrations.Migrations
b.Property<DateTime?>("MODIFY_TIME")
.HasColumnType("datetime2");
b.Property<int>("NUM")
.HasColumnType("int");
b.Property<Guid?>("ORG_ID")
.IsRequired()
.HasColumnType("uniqueidentifier");
@ -19489,6 +19492,9 @@ namespace APT.Data.Migrations.Migrations
b.Property<bool?>("ISSUBMITFINISHINTTIME")
.HasColumnType("bit");
b.Property<bool>("IS_CANCEL")
.HasColumnType("bit");
b.Property<bool>("IS_DELETED")
.HasColumnType("bit");
@ -19506,6 +19512,10 @@ namespace APT.Data.Migrations.Migrations
.IsRequired()
.HasColumnType("uniqueidentifier");
b.Property<string>("REMARK_CANCEL")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<DateTime?>("STARTTIME")
.HasColumnType("datetime2");
@ -19521,6 +19531,9 @@ namespace APT.Data.Migrations.Migrations
b.Property<Guid?>("USER_ID")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("USER_ID_CANCEL")
.HasColumnType("uniqueidentifier");
b.HasKey("ID");
b.HasIndex("APPROVE_ID");
@ -21075,6 +21088,9 @@ namespace APT.Data.Migrations.Migrations
b.Property<bool?>("ISNEEDTOUP")
.HasColumnType("bit");
b.Property<bool>("IS_CANCEL")
.HasColumnType("bit");
b.Property<bool>("IS_DELETED")
.HasColumnType("bit");
@ -21098,6 +21114,10 @@ namespace APT.Data.Migrations.Migrations
b.Property<Guid?>("PLAN_SET_ID")
.HasColumnType("uniqueidentifier");
b.Property<string>("REMARK_CANCEL")
.HasMaxLength(500)
.HasColumnType("nvarchar(500)");
b.Property<int>("RISKSTATE")
.HasColumnType("int");
@ -21113,6 +21133,9 @@ namespace APT.Data.Migrations.Migrations
b.Property<Guid?>("USERID_DOPLAN")
.HasColumnType("uniqueidentifier");
b.Property<Guid?>("USER_ID_CANCEL")
.HasColumnType("uniqueidentifier");
b.HasKey("ID");
b.HasIndex("APPROVE_CHECKAUDIT_ID");

View File

@ -354,6 +354,7 @@ builder.HasOne(t => t.Nav_ApproveCheckAudit).WithMany().HasForeignKey(t => t.APP
builder.Ignore(t => t.FORM_CODE);
builder.Ignore(t => t.IS_OVERTIME);
builder.Ignore(t => t.CREATE_NAME);
builder.Property(t => t.REMARK_CANCEL).HasMaxLength(500);
}
}
#endregion
@ -658,6 +659,7 @@ builder.HasOne(t => t.Nav_User).WithMany().HasForeignKey(t => t.USERID_DOPLAN).O
builder.HasOne(t => t.Nav_Department).WithMany().HasForeignKey(t => t.DEPARTMENTID).OnDelete(DeleteBehavior.Restrict);
builder.Ignore(t => t.FORM_CODE);
builder.Ignore(t => t.IS_OVERTIME);
builder.Property(t => t.REMARK_CANCEL).HasMaxLength(500);
}
}
#endregion

View File

@ -229,5 +229,23 @@ namespace APT.MS.Domain.Entities.BS
[FormFieldTable]
[FormFieldEdit]
public BSMineTypeEnum? CHECKOBJECT { get; set; }
/// <summary>
/// 是否取消
/// </summary>
[Description("是否取消")]
public bool IS_CANCEL { get; set; } = false;
/// <summary>
/// 取消人
/// </summary>
[Description("取消人")]
public Guid? USER_ID_CANCEL { get; set; }
/// <summary>
/// 取消备注
/// </summary>
[Description("取消备注")]
public string REMARK_CANCEL { get; set; }
}
}

View File

@ -333,5 +333,23 @@ namespace APT.MS.Domain.Entities.BS
/// </summary>
[Description("是否需要上报")]
public bool? ISNEEDTOUP { get; set; }
/// <summary>
/// 是否取消
/// </summary>
[Description("是否取消")]
public bool IS_CANCEL { get; set; } = false;
/// <summary>
/// 取消人
/// </summary>
[Description("取消人")]
public Guid? USER_ID_CANCEL { get; set; }
/// <summary>
/// 取消备注
/// </summary>
[Description("取消备注")]
public string REMARK_CANCEL { get; set; }
}
}

View File

@ -8561,7 +8561,8 @@ namespace APT.BS.WebApi.Controllers.Api
if (CheckID == Guid.Empty)
throw new Exception("获取信息失败,请重试!");
if (string.IsNullOrEmpty(filter.Parameter2))
throw new Exception("取消原因不能为空!");
var Check = GetEntity<T_BS_SAFE_CHECK>(CheckID);
if (Check == null)
throw new Exception("未获取到检查单,操作失败!");
@ -8570,6 +8571,10 @@ namespace APT.BS.WebApi.Controllers.Api
Check.MODIFIER_ID = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
Check.MODIFY_TIME = DateTime.Now;
Check.IS_CANCEL = true;
Check.USER_ID_CANCEL = APT.Infrastructure.Api.AppContext.CurrentSession.UserID;
Check.REMARK_CANCEL = filter.Parameter2;
T_FM_NOTIFICATION_TASK task = null;
if (TaskID != Guid.Empty)
{