Browse Source

提交

master
赵新宇 2 weeks ago
parent
commit
57de218437
  1. 3
      API/TaskManager.EntityFramework/JobDbContext.cs
  2. 5175
      API/TaskManager.EntityFramework/Migrations/20250603010854_z202506030001.Designer.cs
  3. 34
      API/TaskManager.EntityFramework/Migrations/20250603010854_z202506030001.cs
  4. 5223
      API/TaskManager.EntityFramework/Migrations/20250603014933_z202506030002.Designer.cs
  5. 43
      API/TaskManager.EntityFramework/Migrations/20250603014933_z202506030002.cs
  6. 55
      API/TaskManager.EntityFramework/Migrations/JobDbContextModelSnapshot.cs
  7. 6
      API/TaskManager.EntityFramework/Repository/Repository.cs
  8. 4
      API/Wood.Service/Controllers/NormalBaseController.cs

3
API/TaskManager.EntityFramework/JobDbContext.cs

@ -223,6 +223,9 @@ namespace TaskManager.EntityFramework
public DbSet<TaskConifgure> TaskConifgure { get; set; }
//public DbSet<TaskConifgure> TaskConifgures { get; set; }
public DbSet<TaskSub> TaskSubs { get; set; }
public DbSet<TaskAllocation> TaskAllocation { get; set; }
#region DATA
/// <summary>

5175
API/TaskManager.EntityFramework/Migrations/20250603010854_z202506030001.Designer.cs

File diff suppressed because it is too large

34
API/TaskManager.EntityFramework/Migrations/20250603010854_z202506030001.cs

@ -0,0 +1,34 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace TaskManager.EntityFramework.Migrations
{
/// <inheritdoc />
public partial class z202506030001 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<decimal>(
name: "QuantityDemand3",
table: "SUPPLIER_MRP_DATE",
type: "decimal(18,2)",
nullable: false,
oldClrType: typeof(int),
oldType: "int");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<int>(
name: "QuantityDemand3",
table: "SUPPLIER_MRP_DATE",
type: "int",
nullable: false,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
}
}
}

5223
API/TaskManager.EntityFramework/Migrations/20250603014933_z202506030002.Designer.cs

File diff suppressed because it is too large

43
API/TaskManager.EntityFramework/Migrations/20250603014933_z202506030002.cs

@ -0,0 +1,43 @@
using System;
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace TaskManager.EntityFramework.Migrations
{
/// <inheritdoc />
public partial class z202506030002 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.CreateTable(
name: "TaskAllocation",
columns: table => new
{
UId = table.Column<long>(type: "bigint", nullable: false)
.Annotation("SqlServer:Identity", "1, 1"),
TaskName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
TableName = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Creator = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
Subscriber = table.Column<string>(type: "nvarchar(50)", maxLength: 50, nullable: false),
WriteState = table.Column<bool>(type: "bit", nullable: false),
ReadState = table.Column<bool>(type: "bit", nullable: false),
CreationTime = table.Column<DateTime>(type: "datetime2", nullable: false),
Remark = table.Column<string>(type: "nvarchar(max)", nullable: true),
TaskId = table.Column<Guid>(type: "uniqueidentifier", nullable: false)
},
constraints: table =>
{
table.PrimaryKey("PK_TaskAllocation", x => x.UId);
});
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropTable(
name: "TaskAllocation");
}
}
}

55
API/TaskManager.EntityFramework/Migrations/JobDbContextModelSnapshot.cs

@ -2685,8 +2685,8 @@ namespace TaskManager.EntityFramework.Migrations
b.Property<decimal>("QuantityDemand29")
.HasColumnType("decimal(18,2)");
b.Property<int>("QuantityDemand3")
.HasColumnType("int");
b.Property<decimal>("QuantityDemand3")
.HasColumnType("decimal(18,2)");
b.Property<decimal>("QuantityDemand30")
.HasColumnType("decimal(18,2)");
@ -4840,14 +4840,12 @@ namespace TaskManager.EntityFramework.Migrations
.HasColumnType("nvarchar(50)");
b.Property<DateTime?>("CreateTime")
.HasMaxLength(50)
.HasColumnType("datetime2");
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2");
b.Property<DateTime?>("DateReceived")
.HasMaxLength(50)
.HasColumnType("datetime2");
b.Property<string>("Id")
@ -4900,7 +4898,6 @@ namespace TaskManager.EntityFramework.Migrations
.HasColumnType("nvarchar(50)");
b.Property<DateTime?>("UpdateTime")
.HasMaxLength(50)
.HasColumnType("datetime2");
b.Property<int>("Version")
@ -5013,6 +5010,54 @@ namespace TaskManager.EntityFramework.Migrations
b.ToTable("SUPPLIER_SINV_DATA", (string)null);
});
modelBuilder.Entity("TaskManager.Entity.TaskAllocation", b =>
{
b.Property<long>("UId")
.ValueGeneratedOnAdd()
.HasColumnType("bigint");
SqlServerPropertyBuilderExtensions.UseIdentityColumn(b.Property<long>("UId"));
b.Property<DateTime>("CreationTime")
.HasColumnType("datetime2");
b.Property<string>("Creator")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<bool>("ReadState")
.HasColumnType("bit");
b.Property<string>("Remark")
.HasColumnType("nvarchar(max)");
b.Property<string>("Subscriber")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("TableName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<Guid>("TaskId")
.HasColumnType("uniqueidentifier");
b.Property<string>("TaskName")
.IsRequired()
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<bool>("WriteState")
.HasColumnType("bit");
b.HasKey("UId");
b.ToTable("TaskAllocation");
});
modelBuilder.Entity("TaskManager.Entity.TaskConifgure", b =>
{
b.Property<long>("UId")

6
API/TaskManager.EntityFramework/Repository/Repository.cs

@ -87,7 +87,11 @@ namespace TaskManager.EntityFramework.Repository
// 应用分页和排序
pagingParams ??= new PagingParams();
return await query.ToPagedListAsync(pagingParams);
var page=await query.ToPagedListAsync(pagingParams);
return page;
}
}

4
API/Wood.Service/Controllers/NormalBaseController.cs

@ -110,7 +110,7 @@ namespace Wood.Service.Controllers
/// <param name="filters"></param>
/// <returns></returns>
[HttpGet]
public async Task<ActionResult<TaskManager.EntityFramework.Repository.PagedResult<T>>> GetPaged(
public async Task<ActionResult> GetPaged(
[FromQuery] int pageNumber = 1,
[FromQuery] int pageSize = 10,
[FromQuery] string sortBy = "",
@ -130,7 +130,7 @@ namespace Wood.Service.Controllers
Expression<Func<T, bool>> filter = null;
var pagedResult = await _repository.GetPagedAsync(filter, pagingParams);
return Ok(pagedResult);
return new JsonResult(pagedResult);
}
/// <summary>

Loading…
Cancel
Save