Browse Source

更新版本

master
赵新宇 3 days ago
parent
commit
2307a9ec19
  1. 20
      API/TaskManager.Entity/Entity.cs
  2. 1
      API/TaskManager.Entity/TaskManager.Entity.csproj
  3. 5320
      API/TaskManager.EntityFramework/Migrations/20250610023901_z202506100001.Designer.cs
  4. 420
      API/TaskManager.EntityFramework/Migrations/20250610023901_z202506100001.cs
  5. 91
      API/TaskManager.EntityFramework/Migrations/JobDbContextModelSnapshot.cs
  6. 21
      API/Wood.Service/Controllers/CheryRecurringJobInputPageController.cs
  7. 13
      API/Wood.Service/Controllers/CheryRecurringJobOutPageController.cs

20
API/TaskManager.Entity/Entity.cs

@ -8,8 +8,10 @@ using System.Text.Json.Serialization;
using System.Threading.Tasks;
using System.Xml.Linq;
using Magicodes.ExporterAndImporter.Core;
using Newtonsoft.Json;
using OfficeOpenXml.FormulaParsing.Excel.Functions.Math;
using Microsoft.EntityFrameworkCore;
namespace TaskManager.Entity
{
@ -220,7 +222,7 @@ namespace TaskManager.Entity
}
[Index(nameof(Id), IsUnique = true)]
public class CherryReadBaseEntity:BaseEntity
{
@ -235,6 +237,7 @@ namespace TaskManager.Entity
/// </summary>
[ExporterHeader(DisplayName = "奇瑞记录ID")]
[MaxLength(50)]
public string? Id { get; set; }
}
public class CherryConReadBaseEntity : BaseEntity
@ -345,21 +348,15 @@ namespace TaskManager.Entity
}
/// <summary>
/// 整车月度生产计划-2
/// </summary>
public class SUPPLIER_PRO_PLANING : CherryReadBaseEntity
{
/// <summary>
/// 主键ID
/// </summary>
[JsonPropertyName("id")]
[ExporterHeader(DisplayName = "主键ID")]
public string? Id { get; set; }
/// <summary>
/// 需求发布版次:唯一版次ID
/// </summary>
@ -518,7 +515,10 @@ namespace TaskManager.Entity
[ExporterHeader(DisplayName = "销售部门")] // 推测拼写错误并自定义显示名
public string? SalseDepartment { get; set; } = String.Empty;
}

1
API/TaskManager.Entity/TaskManager.Entity.csproj

@ -9,6 +9,7 @@
<ItemGroup>
<PackageReference Include="Magicodes.IE.Core" Version="2.7.5.2" />
<PackageReference Include="Magicodes.IE.Excel" Version="2.7.5.2" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.0" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.3" />
</ItemGroup>

5320
API/TaskManager.EntityFramework/Migrations/20250610023901_z202506100001.Designer.cs

File diff suppressed because it is too large

420
API/TaskManager.EntityFramework/Migrations/20250610023901_z202506100001.cs

@ -0,0 +1,420 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace TaskManager.EntityFramework.Migrations
{
/// <inheritdoc />
public partial class z202506100001 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.AlterColumn<string>(
name: "Id",
table: "SUPPLIER_PRO_PLANING",
type: "nvarchar(450)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(max)",
oldNullable: true);
migrationBuilder.AlterColumn<decimal>(
name: "QuantityDemand9",
table: "SUPPLIER_MRP_MONTH",
type: "decimal(18,2)",
nullable: true,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "QuantityDemand8",
table: "SUPPLIER_MRP_MONTH",
type: "decimal(18,2)",
nullable: true,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "QuantityDemand7",
table: "SUPPLIER_MRP_MONTH",
type: "decimal(18,2)",
nullable: true,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "QuantityDemand6",
table: "SUPPLIER_MRP_MONTH",
type: "decimal(18,2)",
nullable: true,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "QuantityDemand5",
table: "SUPPLIER_MRP_MONTH",
type: "decimal(18,2)",
nullable: true,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "QuantityDemand4",
table: "SUPPLIER_MRP_MONTH",
type: "decimal(18,2)",
nullable: true,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "QuantityDemand3",
table: "SUPPLIER_MRP_MONTH",
type: "decimal(18,2)",
nullable: true,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "QuantityDemand2",
table: "SUPPLIER_MRP_MONTH",
type: "decimal(18,2)",
nullable: true,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "QuantityDemand11",
table: "SUPPLIER_MRP_MONTH",
type: "decimal(18,2)",
nullable: true,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "QuantityDemand10",
table: "SUPPLIER_MRP_MONTH",
type: "decimal(18,2)",
nullable: true,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AlterColumn<decimal>(
name: "QuantityDemand1",
table: "SUPPLIER_MRP_MONTH",
type: "decimal(18,2)",
nullable: true,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)");
migrationBuilder.AddColumn<string>(
name: "Id",
table: "SUPPLIER_CON_PO",
type: "nvarchar(50)",
maxLength: 50,
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Id",
table: "SUPPLIER_CON_MMRP",
type: "nvarchar(max)",
nullable: true);
migrationBuilder.AddColumn<string>(
name: "Id",
table: "SUPPLIER_CON_DATE",
type: "nvarchar(50)",
maxLength: 50,
nullable: true);
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_SINV_DATA_Id",
table: "SUPPLIER_SINV_DATA",
column: "Id",
unique: true,
filter: "[Id] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_SA_WEEK_Id",
table: "SUPPLIER_SA_WEEK",
column: "Id",
unique: true,
filter: "[Id] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_RETURN_Id",
table: "SUPPLIER_RETURN",
column: "Id",
unique: true,
filter: "[Id] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PRO_TSCHEDUL_Id",
table: "SUPPLIER_PRO_TSCHEDUL",
column: "Id",
unique: true,
filter: "[Id] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PRO_PLANING_Id",
table: "SUPPLIER_PRO_PLANING",
column: "Id",
unique: true,
filter: "[Id] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PRO_HSCHEDUL_Id",
table: "SUPPLIER_PRO_HSCHEDUL",
column: "Id",
unique: true,
filter: "[Id] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PRO_CSCHEDUL_Id",
table: "SUPPLIER_PRO_CSCHEDUL",
column: "Id",
unique: true,
filter: "[Id] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PO_Id",
table: "SUPPLIER_PO",
column: "Id",
unique: true,
filter: "[Id] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_MRP_WARNING_Id",
table: "SUPPLIER_MRP_WARNING",
column: "Id",
unique: true,
filter: "[Id] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_MRP_STATE_Id",
table: "SUPPLIER_MRP_STATE",
column: "Id",
unique: true,
filter: "[Id] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_MRP_MONTH_Id",
table: "SUPPLIER_MRP_MONTH",
column: "Id",
unique: true,
filter: "[Id] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_MRP_DATE_Id",
table: "SUPPLIER_MRP_DATE",
column: "Id",
unique: true,
filter: "[Id] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_INV_DATA_Id",
table: "SUPPLIER_INV_DATA",
column: "Id",
unique: true,
filter: "[Id] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_DEL_STATE_Id",
table: "SUPPLIER_DEL_STATE",
column: "Id",
unique: true,
filter: "[Id] IS NOT NULL");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_SINV_DATA_Id",
table: "SUPPLIER_SINV_DATA");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_SA_WEEK_Id",
table: "SUPPLIER_SA_WEEK");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_RETURN_Id",
table: "SUPPLIER_RETURN");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_TSCHEDUL_Id",
table: "SUPPLIER_PRO_TSCHEDUL");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_PLANING_Id",
table: "SUPPLIER_PRO_PLANING");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_HSCHEDUL_Id",
table: "SUPPLIER_PRO_HSCHEDUL");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_CSCHEDUL_Id",
table: "SUPPLIER_PRO_CSCHEDUL");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PO_Id",
table: "SUPPLIER_PO");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_MRP_WARNING_Id",
table: "SUPPLIER_MRP_WARNING");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_MRP_STATE_Id",
table: "SUPPLIER_MRP_STATE");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_MRP_MONTH_Id",
table: "SUPPLIER_MRP_MONTH");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_MRP_DATE_Id",
table: "SUPPLIER_MRP_DATE");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_INV_DATA_Id",
table: "SUPPLIER_INV_DATA");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_DEL_STATE_Id",
table: "SUPPLIER_DEL_STATE");
migrationBuilder.DropColumn(
name: "Id",
table: "SUPPLIER_CON_PO");
migrationBuilder.DropColumn(
name: "Id",
table: "SUPPLIER_CON_MMRP");
migrationBuilder.DropColumn(
name: "Id",
table: "SUPPLIER_CON_DATE");
migrationBuilder.AlterColumn<string>(
name: "Id",
table: "SUPPLIER_PRO_PLANING",
type: "nvarchar(max)",
nullable: true,
oldClrType: typeof(string),
oldType: "nvarchar(450)",
oldNullable: true);
migrationBuilder.AlterColumn<decimal>(
name: "QuantityDemand9",
table: "SUPPLIER_MRP_MONTH",
type: "decimal(18,2)",
nullable: false,
defaultValue: 0m,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)",
oldNullable: true);
migrationBuilder.AlterColumn<decimal>(
name: "QuantityDemand8",
table: "SUPPLIER_MRP_MONTH",
type: "decimal(18,2)",
nullable: false,
defaultValue: 0m,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)",
oldNullable: true);
migrationBuilder.AlterColumn<decimal>(
name: "QuantityDemand7",
table: "SUPPLIER_MRP_MONTH",
type: "decimal(18,2)",
nullable: false,
defaultValue: 0m,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)",
oldNullable: true);
migrationBuilder.AlterColumn<decimal>(
name: "QuantityDemand6",
table: "SUPPLIER_MRP_MONTH",
type: "decimal(18,2)",
nullable: false,
defaultValue: 0m,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)",
oldNullable: true);
migrationBuilder.AlterColumn<decimal>(
name: "QuantityDemand5",
table: "SUPPLIER_MRP_MONTH",
type: "decimal(18,2)",
nullable: false,
defaultValue: 0m,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)",
oldNullable: true);
migrationBuilder.AlterColumn<decimal>(
name: "QuantityDemand4",
table: "SUPPLIER_MRP_MONTH",
type: "decimal(18,2)",
nullable: false,
defaultValue: 0m,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)",
oldNullable: true);
migrationBuilder.AlterColumn<decimal>(
name: "QuantityDemand3",
table: "SUPPLIER_MRP_MONTH",
type: "decimal(18,2)",
nullable: false,
defaultValue: 0m,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)",
oldNullable: true);
migrationBuilder.AlterColumn<decimal>(
name: "QuantityDemand2",
table: "SUPPLIER_MRP_MONTH",
type: "decimal(18,2)",
nullable: false,
defaultValue: 0m,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)",
oldNullable: true);
migrationBuilder.AlterColumn<decimal>(
name: "QuantityDemand11",
table: "SUPPLIER_MRP_MONTH",
type: "decimal(18,2)",
nullable: false,
defaultValue: 0m,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)",
oldNullable: true);
migrationBuilder.AlterColumn<decimal>(
name: "QuantityDemand10",
table: "SUPPLIER_MRP_MONTH",
type: "decimal(18,2)",
nullable: false,
defaultValue: 0m,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)",
oldNullable: true);
migrationBuilder.AlterColumn<decimal>(
name: "QuantityDemand1",
table: "SUPPLIER_MRP_MONTH",
type: "decimal(18,2)",
nullable: false,
defaultValue: 0m,
oldClrType: typeof(decimal),
oldType: "decimal(18,2)",
oldNullable: true);
}
}
}

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

@ -37,6 +37,10 @@ namespace TaskManager.EntityFramework.Migrations
.HasMaxLength(10)
.HasColumnType("NVARCHAR");
b.Property<string>("Id")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("MaterialCode")
.HasMaxLength(50)
.HasColumnType("NVARCHAR");
@ -229,6 +233,9 @@ namespace TaskManager.EntityFramework.Migrations
.HasMaxLength(10)
.HasColumnType("NVARCHAR");
b.Property<string>("Id")
.HasColumnType("nvarchar(max)");
b.Property<string>("MaterialCode")
.HasMaxLength(50)
.HasColumnType("NVARCHAR");
@ -346,6 +353,10 @@ namespace TaskManager.EntityFramework.Migrations
.HasMaxLength(10)
.HasColumnType("NVARCHAR");
b.Property<string>("Id")
.HasMaxLength(50)
.HasColumnType("nvarchar(50)");
b.Property<string>("Measures")
.HasMaxLength(255)
.HasColumnType("NVARCHAR");
@ -1986,6 +1997,10 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.ToTable("SUPPLIER_DEL_STATE");
});
@ -2561,6 +2576,10 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.ToTable("SUPPLIER_INV_DATA");
});
@ -2736,6 +2755,10 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.ToTable("SUPPLIER_MRP_DATE");
});
@ -2792,15 +2815,15 @@ namespace TaskManager.EntityFramework.Migrations
.HasColumnType("nvarchar(50)")
.HasAnnotation("Relational:JsonPropertyName", "plantName");
b.Property<decimal>("QuantityDemand1")
b.Property<decimal?>("QuantityDemand1")
.HasColumnType("decimal(18,2)")
.HasAnnotation("Relational:JsonPropertyName", "quantityDemand1");
b.Property<decimal>("QuantityDemand10")
b.Property<decimal?>("QuantityDemand10")
.HasColumnType("decimal(18,2)")
.HasAnnotation("Relational:JsonPropertyName", "quantityDemand10");
b.Property<decimal>("QuantityDemand11")
b.Property<decimal?>("QuantityDemand11")
.HasColumnType("decimal(18,2)")
.HasAnnotation("Relational:JsonPropertyName", "quantityDemand11");
@ -2808,35 +2831,35 @@ namespace TaskManager.EntityFramework.Migrations
.HasColumnType("decimal(18,2)")
.HasAnnotation("Relational:JsonPropertyName", "quantityDemand12");
b.Property<decimal>("QuantityDemand2")
b.Property<decimal?>("QuantityDemand2")
.HasColumnType("decimal(18,2)")
.HasAnnotation("Relational:JsonPropertyName", "quantityDemand2");
b.Property<decimal>("QuantityDemand3")
b.Property<decimal?>("QuantityDemand3")
.HasColumnType("decimal(18,2)")
.HasAnnotation("Relational:JsonPropertyName", "quantityDemand3");
b.Property<decimal>("QuantityDemand4")
b.Property<decimal?>("QuantityDemand4")
.HasColumnType("decimal(18,2)")
.HasAnnotation("Relational:JsonPropertyName", "quantityDemand4");
b.Property<decimal>("QuantityDemand5")
b.Property<decimal?>("QuantityDemand5")
.HasColumnType("decimal(18,2)")
.HasAnnotation("Relational:JsonPropertyName", "quantityDemand5");
b.Property<decimal>("QuantityDemand6")
b.Property<decimal?>("QuantityDemand6")
.HasColumnType("decimal(18,2)")
.HasAnnotation("Relational:JsonPropertyName", "quantityDemand6");
b.Property<decimal>("QuantityDemand7")
b.Property<decimal?>("QuantityDemand7")
.HasColumnType("decimal(18,2)")
.HasAnnotation("Relational:JsonPropertyName", "quantityDemand7");
b.Property<decimal>("QuantityDemand8")
b.Property<decimal?>("QuantityDemand8")
.HasColumnType("decimal(18,2)")
.HasAnnotation("Relational:JsonPropertyName", "quantityDemand8");
b.Property<decimal>("QuantityDemand9")
b.Property<decimal?>("QuantityDemand9")
.HasColumnType("decimal(18,2)")
.HasAnnotation("Relational:JsonPropertyName", "quantityDemand9");
@ -2881,6 +2904,10 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.ToTable("SUPPLIER_MRP_MONTH");
});
@ -3001,6 +3028,10 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.ToTable("SUPPLIER_MRP_STATE");
});
@ -3090,6 +3121,10 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.ToTable("SUPPLIER_MRP_WARNING");
});
@ -3217,6 +3252,10 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.ToTable("SUPPLIER_PO");
});
@ -3588,6 +3627,10 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.ToTable("SUPPLIER_PRO_CSCHEDUL");
});
@ -4051,6 +4094,10 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.ToTable("SUPPLIER_PRO_HSCHEDUL");
});
@ -4256,7 +4303,7 @@ namespace TaskManager.EntityFramework.Migrations
.HasColumnType("datetime2");
b.Property<string>("Id")
.HasColumnType("nvarchar(max)")
.HasColumnType("nvarchar(450)")
.HasAnnotation("Relational:JsonPropertyName", "id");
b.Property<int>("IsDelete")
@ -4359,6 +4406,10 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.ToTable("SUPPLIER_PRO_PLANING");
});
@ -4718,6 +4769,10 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.ToTable("SUPPLIER_PRO_TSCHEDUL");
});
@ -4832,6 +4887,10 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.ToTable("SUPPLIER_RETURN");
});
@ -4918,6 +4977,10 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.ToTable("SUPPLIER_SA_WEEK");
});
@ -5019,6 +5082,10 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.ToTable("SUPPLIER_SINV_DATA", (string)null);
});

21
API/Wood.Service/Controllers/CheryRecurringJobInputPageController.cs

@ -10,6 +10,7 @@ using Microsoft.Extensions.DependencyInjection;
using Omu.ValueInjecter;
using System.Data;
using System.Drawing.Printing;
using System.Globalization;
using System.Linq.Expressions;
using System.Security.Policy;
using System.Text;
@ -82,7 +83,14 @@ namespace TaskManager.Controllers
new JsonSerializerOptions
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
Converters= { new DecimalTrimConverter() },
WriteIndented = true // 可选,用于格式化输出
}
);
inputjson = RemoveWhitespace(inputjson);
@ -512,6 +520,19 @@ namespace TaskManager.Controllers
}
public class DecimalTrimConverter : JsonConverter<decimal>
{
public override decimal Read(ref Utf8JsonReader reader, Type typeToConvert, JsonSerializerOptions options)
{
return reader.GetDecimal();
}
public override void Write(Utf8JsonWriter writer, decimal value, JsonSerializerOptions options)
{
// 关键步骤:使用 TrimTrailingZeros() 去掉末尾的 0
writer.WriteStringValue(value.ToString("0.########################", CultureInfo.InvariantCulture));
}
}

13
API/Wood.Service/Controllers/CheryRecurringJobOutPageController.cs

@ -102,6 +102,18 @@ namespace TaskManager.Controllers
totalItems = int.Parse(firstResponse.Data.Total);
pageSize = int.Parse(firstResponse.Data.PageSize);
List<T> pagefirstList = new List<T>();
// firstResponse.Data.Rows.Select(p=>p.Id)
foreach (var itm in firstResponse.Data.Rows)
{
T entity = new T();
@ -392,7 +404,6 @@ namespace TaskManager.Controllers
var first= _jobDbContext.TaskConifgure.FirstOrDefault(p => p.TaskName == taskName && p.Client == client);
if (first == null)
{
return;
}

Loading…
Cancel
Save