Browse Source

变更索引

master
赵新宇 1 day ago
parent
commit
9b2858237b
  1. 6
      API/TaskManager.Entity/Entity.cs
  2. 9985
      API/TaskManager.EntityFramework/Migrations/20250617065901_z202506170001.Designer.cs
  3. 921
      API/TaskManager.EntityFramework/Migrations/20250617065901_z202506170001.cs
  4. 186
      API/TaskManager.EntityFramework/Migrations/JobDbContextModelSnapshot.cs
  5. 3
      API/Wood.Service/Controllers/CheryDataMaintenanceService.cs
  6. 33
      API/Wood.Service/Controllers/CheryRecurringJobInputPageController.cs
  7. 1
      API/Wood.Service/Controllers/CheryRecurringJobInputPageExtendController.cs
  8. 58
      API/Wood.Service/Controllers/CheryRecurringJobOutPageController.cs
  9. 17
      API/Wood.Service/Controllers/CherySupplierConDateService.cs
  10. 12
      API/Wood.Service/Controllers/CherySupplierConMmrpService.cs
  11. 16
      API/Wood.Service/Controllers/CherySupplierConPoService.cs
  12. 2
      API/Wood.Service/Controllers/CherySupplierMrpDataService.cs
  13. 2
      API/Wood.Service/Controllers/CherySupplierPoService.cs
  14. 174
      API/Wood.Service/Controllers/CustomLogService.cs
  15. 237
      API/Wood.Service/Controllers/LogConsumerService.cs
  16. 32
      API/Wood.Service/Controllers/LogController.cs
  17. 4
      API/Wood.Service/Controllers/RecurringJobBaseController.cs

6
API/TaskManager.Entity/Entity.cs

@ -250,11 +250,11 @@ namespace TaskManager.Entity
}
[Index(nameof(Id), IsUnique = true)]
[Index(nameof(Id), IsUnique = false)]
[Index(nameof(TaskId), IsUnique = false)]
[Index(nameof(WriteState), IsUnique = false)]
[Index(nameof(ReadState), IsUnique = false)]
[Index(nameof(RequestDate), IsUnique = false)]
public class CherryReadBaseEntity:BaseEntity
{
@ -273,7 +273,7 @@ namespace TaskManager.Entity
public string? Id { get; set; }
}
[Index(nameof(Id), IsUnique = true)]
[Index(nameof(Id), IsUnique = false)]
[Index(nameof(TaskId), IsUnique = false)]
[Index(nameof(WriteState), IsUnique = false)]
[Index(nameof(ReadState), IsUnique = false)]

9985
API/TaskManager.EntityFramework/Migrations/20250617065901_z202506170001.Designer.cs

File diff suppressed because it is too large

921
API/TaskManager.EntityFramework/Migrations/20250617065901_z202506170001.cs

@ -0,0 +1,921 @@
using Microsoft.EntityFrameworkCore.Migrations;
#nullable disable
namespace TaskManager.EntityFramework.Migrations
{
/// <inheritdoc />
public partial class z202506170001 : Migration
{
/// <inheritdoc />
protected override void Up(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_SINV_DATA_LOGS_Id",
table: "SUPPLIER_SINV_DATA_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_SINV_DATA_Id",
table: "SUPPLIER_SINV_DATA");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_SA_WEEK_LOGS_Id",
table: "SUPPLIER_SA_WEEK_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_SA_WEEK_Id",
table: "SUPPLIER_SA_WEEK");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_RETURN_LOGS_Id",
table: "SUPPLIER_RETURN_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_RETURN_Id",
table: "SUPPLIER_RETURN");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_TSCHEDUL_LOGS_Id",
table: "SUPPLIER_PRO_TSCHEDUL_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_TSCHEDUL_Id",
table: "SUPPLIER_PRO_TSCHEDUL");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_PLANING_LOGS_Id",
table: "SUPPLIER_PRO_PLANING_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_PLANING_Id",
table: "SUPPLIER_PRO_PLANING");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_HSCHEDUL_LOGS_Id",
table: "SUPPLIER_PRO_HSCHEDUL_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_HSCHEDUL_Id",
table: "SUPPLIER_PRO_HSCHEDUL");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_CSCHEDUL_LOGS_Id",
table: "SUPPLIER_PRO_CSCHEDUL_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_CSCHEDUL_Id",
table: "SUPPLIER_PRO_CSCHEDUL");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PO_LOGS_Id",
table: "SUPPLIER_PO_LOGS");
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_LOGS_Id",
table: "SUPPLIER_MRP_STATE_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_MRP_STATE_Id",
table: "SUPPLIER_MRP_STATE");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_MRP_MONTH_LOGS_Id",
table: "SUPPLIER_MRP_MONTH_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_MRP_MONTH_Id",
table: "SUPPLIER_MRP_MONTH");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_MRP_DATE_LOGS_Id",
table: "SUPPLIER_MRP_DATE_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_MRP_DATE_Id",
table: "SUPPLIER_MRP_DATE");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_INV_DATA_LOGS_Id",
table: "SUPPLIER_INV_DATA_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_INV_DATA_Id",
table: "SUPPLIER_INV_DATA");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_DEL_STATE_LOGS_Id",
table: "SUPPLIER_DEL_STATE_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_DEL_STATE_Id",
table: "SUPPLIER_DEL_STATE");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_CON_PO_LOGS_Id",
table: "SUPPLIER_CON_PO_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_CON_PO_Id",
table: "SUPPLIER_CON_PO");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_CON_MMRP_LOGS_Id",
table: "SUPPLIER_CON_MMRP_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_CON_MMRP_Id",
table: "SUPPLIER_CON_MMRP");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_CON_DATE_LOGS_Id",
table: "SUPPLIER_CON_DATE_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_CON_DATE_Id",
table: "SUPPLIER_CON_DATE");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_SINV_DATA_LOGS_Id",
table: "SUPPLIER_SINV_DATA_LOGS",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_SINV_DATA_LOGS_RequestDate",
table: "SUPPLIER_SINV_DATA_LOGS",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_SINV_DATA_Id",
table: "SUPPLIER_SINV_DATA",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_SINV_DATA_RequestDate",
table: "SUPPLIER_SINV_DATA",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_SA_WEEK_LOGS_Id",
table: "SUPPLIER_SA_WEEK_LOGS",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_SA_WEEK_LOGS_RequestDate",
table: "SUPPLIER_SA_WEEK_LOGS",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_SA_WEEK_Id",
table: "SUPPLIER_SA_WEEK",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_SA_WEEK_RequestDate",
table: "SUPPLIER_SA_WEEK",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_RETURN_LOGS_Id",
table: "SUPPLIER_RETURN_LOGS",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_RETURN_LOGS_RequestDate",
table: "SUPPLIER_RETURN_LOGS",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_RETURN_Id",
table: "SUPPLIER_RETURN",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_RETURN_RequestDate",
table: "SUPPLIER_RETURN",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PRO_TSCHEDUL_LOGS_Id",
table: "SUPPLIER_PRO_TSCHEDUL_LOGS",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PRO_TSCHEDUL_LOGS_RequestDate",
table: "SUPPLIER_PRO_TSCHEDUL_LOGS",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PRO_TSCHEDUL_Id",
table: "SUPPLIER_PRO_TSCHEDUL",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PRO_TSCHEDUL_RequestDate",
table: "SUPPLIER_PRO_TSCHEDUL",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PRO_PLANING_LOGS_Id",
table: "SUPPLIER_PRO_PLANING_LOGS",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PRO_PLANING_LOGS_RequestDate",
table: "SUPPLIER_PRO_PLANING_LOGS",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PRO_PLANING_Id",
table: "SUPPLIER_PRO_PLANING",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PRO_PLANING_RequestDate",
table: "SUPPLIER_PRO_PLANING",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PRO_HSCHEDUL_LOGS_Id",
table: "SUPPLIER_PRO_HSCHEDUL_LOGS",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PRO_HSCHEDUL_LOGS_RequestDate",
table: "SUPPLIER_PRO_HSCHEDUL_LOGS",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PRO_HSCHEDUL_Id",
table: "SUPPLIER_PRO_HSCHEDUL",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PRO_HSCHEDUL_RequestDate",
table: "SUPPLIER_PRO_HSCHEDUL",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PRO_CSCHEDUL_LOGS_Id",
table: "SUPPLIER_PRO_CSCHEDUL_LOGS",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PRO_CSCHEDUL_LOGS_RequestDate",
table: "SUPPLIER_PRO_CSCHEDUL_LOGS",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PRO_CSCHEDUL_Id",
table: "SUPPLIER_PRO_CSCHEDUL",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PRO_CSCHEDUL_RequestDate",
table: "SUPPLIER_PRO_CSCHEDUL",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PO_LOGS_Id",
table: "SUPPLIER_PO_LOGS",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PO_LOGS_RequestDate",
table: "SUPPLIER_PO_LOGS",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PO_Id",
table: "SUPPLIER_PO",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_PO_RequestDate",
table: "SUPPLIER_PO",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_MRP_WARNING_Id",
table: "SUPPLIER_MRP_WARNING",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_MRP_WARNING_RequestDate",
table: "SUPPLIER_MRP_WARNING",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_MRP_STATE_LOGS_Id",
table: "SUPPLIER_MRP_STATE_LOGS",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_MRP_STATE_LOGS_RequestDate",
table: "SUPPLIER_MRP_STATE_LOGS",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_MRP_STATE_Id",
table: "SUPPLIER_MRP_STATE",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_MRP_STATE_RequestDate",
table: "SUPPLIER_MRP_STATE",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_MRP_MONTH_LOGS_Id",
table: "SUPPLIER_MRP_MONTH_LOGS",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_MRP_MONTH_LOGS_RequestDate",
table: "SUPPLIER_MRP_MONTH_LOGS",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_MRP_MONTH_Id",
table: "SUPPLIER_MRP_MONTH",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_MRP_MONTH_RequestDate",
table: "SUPPLIER_MRP_MONTH",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_MRP_DATE_LOGS_Id",
table: "SUPPLIER_MRP_DATE_LOGS",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_MRP_DATE_LOGS_RequestDate",
table: "SUPPLIER_MRP_DATE_LOGS",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_MRP_DATE_Id",
table: "SUPPLIER_MRP_DATE",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_MRP_DATE_RequestDate",
table: "SUPPLIER_MRP_DATE",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_INV_DATA_LOGS_Id",
table: "SUPPLIER_INV_DATA_LOGS",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_INV_DATA_LOGS_RequestDate",
table: "SUPPLIER_INV_DATA_LOGS",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_INV_DATA_Id",
table: "SUPPLIER_INV_DATA",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_INV_DATA_RequestDate",
table: "SUPPLIER_INV_DATA",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_DEL_STATE_LOGS_Id",
table: "SUPPLIER_DEL_STATE_LOGS",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_DEL_STATE_LOGS_RequestDate",
table: "SUPPLIER_DEL_STATE_LOGS",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_DEL_STATE_Id",
table: "SUPPLIER_DEL_STATE",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_DEL_STATE_RequestDate",
table: "SUPPLIER_DEL_STATE",
column: "RequestDate");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_CON_PO_LOGS_Id",
table: "SUPPLIER_CON_PO_LOGS",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_CON_PO_Id",
table: "SUPPLIER_CON_PO",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_CON_MMRP_LOGS_Id",
table: "SUPPLIER_CON_MMRP_LOGS",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_CON_MMRP_Id",
table: "SUPPLIER_CON_MMRP",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_CON_DATE_LOGS_Id",
table: "SUPPLIER_CON_DATE_LOGS",
column: "Id");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_CON_DATE_Id",
table: "SUPPLIER_CON_DATE",
column: "Id");
}
/// <inheritdoc />
protected override void Down(MigrationBuilder migrationBuilder)
{
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_SINV_DATA_LOGS_Id",
table: "SUPPLIER_SINV_DATA_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_SINV_DATA_LOGS_RequestDate",
table: "SUPPLIER_SINV_DATA_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_SINV_DATA_Id",
table: "SUPPLIER_SINV_DATA");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_SINV_DATA_RequestDate",
table: "SUPPLIER_SINV_DATA");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_SA_WEEK_LOGS_Id",
table: "SUPPLIER_SA_WEEK_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_SA_WEEK_LOGS_RequestDate",
table: "SUPPLIER_SA_WEEK_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_SA_WEEK_Id",
table: "SUPPLIER_SA_WEEK");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_SA_WEEK_RequestDate",
table: "SUPPLIER_SA_WEEK");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_RETURN_LOGS_Id",
table: "SUPPLIER_RETURN_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_RETURN_LOGS_RequestDate",
table: "SUPPLIER_RETURN_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_RETURN_Id",
table: "SUPPLIER_RETURN");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_RETURN_RequestDate",
table: "SUPPLIER_RETURN");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_TSCHEDUL_LOGS_Id",
table: "SUPPLIER_PRO_TSCHEDUL_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_TSCHEDUL_LOGS_RequestDate",
table: "SUPPLIER_PRO_TSCHEDUL_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_TSCHEDUL_Id",
table: "SUPPLIER_PRO_TSCHEDUL");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_TSCHEDUL_RequestDate",
table: "SUPPLIER_PRO_TSCHEDUL");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_PLANING_LOGS_Id",
table: "SUPPLIER_PRO_PLANING_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_PLANING_LOGS_RequestDate",
table: "SUPPLIER_PRO_PLANING_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_PLANING_Id",
table: "SUPPLIER_PRO_PLANING");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_PLANING_RequestDate",
table: "SUPPLIER_PRO_PLANING");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_HSCHEDUL_LOGS_Id",
table: "SUPPLIER_PRO_HSCHEDUL_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_HSCHEDUL_LOGS_RequestDate",
table: "SUPPLIER_PRO_HSCHEDUL_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_HSCHEDUL_Id",
table: "SUPPLIER_PRO_HSCHEDUL");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_HSCHEDUL_RequestDate",
table: "SUPPLIER_PRO_HSCHEDUL");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_CSCHEDUL_LOGS_Id",
table: "SUPPLIER_PRO_CSCHEDUL_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_CSCHEDUL_LOGS_RequestDate",
table: "SUPPLIER_PRO_CSCHEDUL_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_CSCHEDUL_Id",
table: "SUPPLIER_PRO_CSCHEDUL");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PRO_CSCHEDUL_RequestDate",
table: "SUPPLIER_PRO_CSCHEDUL");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PO_LOGS_Id",
table: "SUPPLIER_PO_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PO_LOGS_RequestDate",
table: "SUPPLIER_PO_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PO_Id",
table: "SUPPLIER_PO");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_PO_RequestDate",
table: "SUPPLIER_PO");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_MRP_WARNING_Id",
table: "SUPPLIER_MRP_WARNING");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_MRP_WARNING_RequestDate",
table: "SUPPLIER_MRP_WARNING");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_MRP_STATE_LOGS_Id",
table: "SUPPLIER_MRP_STATE_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_MRP_STATE_LOGS_RequestDate",
table: "SUPPLIER_MRP_STATE_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_MRP_STATE_Id",
table: "SUPPLIER_MRP_STATE");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_MRP_STATE_RequestDate",
table: "SUPPLIER_MRP_STATE");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_MRP_MONTH_LOGS_Id",
table: "SUPPLIER_MRP_MONTH_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_MRP_MONTH_LOGS_RequestDate",
table: "SUPPLIER_MRP_MONTH_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_MRP_MONTH_Id",
table: "SUPPLIER_MRP_MONTH");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_MRP_MONTH_RequestDate",
table: "SUPPLIER_MRP_MONTH");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_MRP_DATE_LOGS_Id",
table: "SUPPLIER_MRP_DATE_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_MRP_DATE_LOGS_RequestDate",
table: "SUPPLIER_MRP_DATE_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_MRP_DATE_Id",
table: "SUPPLIER_MRP_DATE");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_MRP_DATE_RequestDate",
table: "SUPPLIER_MRP_DATE");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_INV_DATA_LOGS_Id",
table: "SUPPLIER_INV_DATA_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_INV_DATA_LOGS_RequestDate",
table: "SUPPLIER_INV_DATA_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_INV_DATA_Id",
table: "SUPPLIER_INV_DATA");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_INV_DATA_RequestDate",
table: "SUPPLIER_INV_DATA");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_DEL_STATE_LOGS_Id",
table: "SUPPLIER_DEL_STATE_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_DEL_STATE_LOGS_RequestDate",
table: "SUPPLIER_DEL_STATE_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_DEL_STATE_Id",
table: "SUPPLIER_DEL_STATE");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_DEL_STATE_RequestDate",
table: "SUPPLIER_DEL_STATE");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_CON_PO_LOGS_Id",
table: "SUPPLIER_CON_PO_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_CON_PO_Id",
table: "SUPPLIER_CON_PO");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_CON_MMRP_LOGS_Id",
table: "SUPPLIER_CON_MMRP_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_CON_MMRP_Id",
table: "SUPPLIER_CON_MMRP");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_CON_DATE_LOGS_Id",
table: "SUPPLIER_CON_DATE_LOGS");
migrationBuilder.DropIndex(
name: "IX_SUPPLIER_CON_DATE_Id",
table: "SUPPLIER_CON_DATE");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_SINV_DATA_LOGS_Id",
table: "SUPPLIER_SINV_DATA_LOGS",
column: "Id",
unique: true,
filter: "[Id] IS NOT NULL");
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_LOGS_Id",
table: "SUPPLIER_SA_WEEK_LOGS",
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_LOGS_Id",
table: "SUPPLIER_RETURN_LOGS",
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_LOGS_Id",
table: "SUPPLIER_PRO_TSCHEDUL_LOGS",
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_LOGS_Id",
table: "SUPPLIER_PRO_PLANING_LOGS",
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_LOGS_Id",
table: "SUPPLIER_PRO_HSCHEDUL_LOGS",
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_LOGS_Id",
table: "SUPPLIER_PRO_CSCHEDUL_LOGS",
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_LOGS_Id",
table: "SUPPLIER_PO_LOGS",
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_LOGS_Id",
table: "SUPPLIER_MRP_STATE_LOGS",
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_LOGS_Id",
table: "SUPPLIER_MRP_MONTH_LOGS",
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_LOGS_Id",
table: "SUPPLIER_MRP_DATE_LOGS",
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_LOGS_Id",
table: "SUPPLIER_INV_DATA_LOGS",
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_LOGS_Id",
table: "SUPPLIER_DEL_STATE_LOGS",
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");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_CON_PO_LOGS_Id",
table: "SUPPLIER_CON_PO_LOGS",
column: "Id",
unique: true,
filter: "[Id] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_CON_PO_Id",
table: "SUPPLIER_CON_PO",
column: "Id",
unique: true,
filter: "[Id] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_CON_MMRP_LOGS_Id",
table: "SUPPLIER_CON_MMRP_LOGS",
column: "Id",
unique: true,
filter: "[Id] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_CON_MMRP_Id",
table: "SUPPLIER_CON_MMRP",
column: "Id",
unique: true,
filter: "[Id] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_CON_DATE_LOGS_Id",
table: "SUPPLIER_CON_DATE_LOGS",
column: "Id",
unique: true,
filter: "[Id] IS NOT NULL");
migrationBuilder.CreateIndex(
name: "IX_SUPPLIER_CON_DATE_Id",
table: "SUPPLIER_CON_DATE",
column: "Id",
unique: true,
filter: "[Id] IS NOT NULL");
}
}
}

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

@ -215,9 +215,7 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
@ -421,9 +419,7 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
@ -551,9 +547,7 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
@ -681,9 +675,7 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
@ -760,9 +752,7 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
@ -839,9 +829,7 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
@ -3646,12 +3634,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -3755,12 +3743,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -4589,12 +4577,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -4682,12 +4670,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -4867,12 +4855,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -5052,12 +5040,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -5207,12 +5195,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -5362,12 +5350,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -5492,12 +5480,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -5622,12 +5610,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -5721,12 +5709,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -5858,12 +5846,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -5995,12 +5983,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -6637,12 +6625,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -6757,12 +6745,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -7606,12 +7594,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -7703,12 +7691,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -8199,12 +8187,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -8343,12 +8331,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -8979,12 +8967,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -9081,12 +9069,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -9205,12 +9193,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -9329,12 +9317,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -9425,12 +9413,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -9521,12 +9509,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -9632,12 +9620,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");
@ -9743,12 +9731,12 @@ namespace TaskManager.EntityFramework.Migrations
b.HasKey("UId");
b.HasIndex("Id")
.IsUnique()
.HasFilter("[Id] IS NOT NULL");
b.HasIndex("Id");
b.HasIndex("ReadState");
b.HasIndex("RequestDate");
b.HasIndex("TaskId");
b.HasIndex("WriteState");

3
API/Wood.Service/Controllers/CheryDataMaintenanceService.cs

@ -25,9 +25,6 @@ namespace Wood.Service.Controllers
_cherySupplierBomService = cherySupplierBomService;
}
public async Task ExecuteAsync(string url, string path, string takName, string client, int pageSize)

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

@ -55,7 +55,6 @@ namespace TaskManager.Controllers
[HttpGet]
public virtual async Task CustomInvokeAsync(string taskName, string client)
{
try
{
var first = _jobDbContext.TaskConifgure.FirstOrDefault(p => p.TaskName == taskName && p.Client == client);
@ -69,15 +68,10 @@ namespace TaskManager.Controllers
Client = client;
CPageSize = first.PageSize;
await SyncTaskSubTable(TaskName, Client);
// var jobId1 = BackgroundJob.Enqueue(taskName+Guid.NewGuid().ToString("N"),() => SyncTaskSubTable(TaskName, Client));
}
catch (Exception ex) {
await _logger.AddError(ex.Message, TaskName, Guid.NewGuid(), DateTime.Now.ToString("yyyyMMdd"));
}
//await SyncTaskSubTable(TaskName, Client);
@ -99,8 +93,6 @@ namespace TaskManager.Controllers
try
{
string inputjson = string.Empty;
if (TaskName == "日物料需求计划风险确认")//格式特殊处理
{
inputjson = JsonSerializer.Serialize(t,
@ -112,8 +104,6 @@ namespace TaskManager.Controllers
new DecimalTrimConverter(),
new InputCustomDateTimeConverter(),
new InputCustomNullableDateTimeConverter()
},
WriteIndented = false,// 可选,用于格式化输出
Encoder = System.Text.Encodings.Web.JavaScriptEncoder.Create(System.Text.Unicode.UnicodeRanges.All)
@ -129,20 +119,16 @@ namespace TaskManager.Controllers
Converters =
{
new DecimalTrimConverter(),
},
WriteIndented = false,// 可选,用于格式化输出
Encoder = System.Text.Encodings.Web.JavaScriptEncoder.Create(System.Text.Unicode.UnicodeRanges.All)
}
);
}
//inputjson = RemoveWhitespace(inputjson);
var content = await Post(Url, Path, inputjson,taskId,version);
if (!string.IsNullOrEmpty(content))
{
var options = new JsonSerializerOptions
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
@ -164,10 +150,7 @@ namespace TaskManager.Controllers
await _logger.AddError($"调用接口无返回值错误{ex.Message}", TaskName,taskId,version);
return null;
}
}
public static string GenerateRandomStringWith8EG()
{
const string chars = "ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789";
@ -199,11 +182,10 @@ namespace TaskManager.Controllers
[NonAction]
public async Task SyncTaskSubTable(string taskName, string client)
{
var version = DateTime.Now.ToString("yyyyMMdd");
if (string.IsNullOrEmpty(taskName) || string.IsNullOrEmpty(client))
{
await _logger.AddError("任务名称或客户端不能为空",taskName,Guid.NewGuid(),DateTime.Now.ToString("yyyyMMdd"));
await _logger.AddError("任务名称或客户端不能为空",taskName,Guid.NewGuid(),version);
return;
}
var sublist = _jobDbContext.TaskSub.Where(p => taskName.Contains(p.TaskName) && p.WriteState == false && p.Subscriber == client ).ToList();
@ -219,12 +201,9 @@ namespace TaskManager.Controllers
var total = entites.Count();
sub.DataCount = total;
int totalPages = (int)Math.Ceiling((double)total / pageSize);
int startPage =sub.SyncedPageCount == 0 ? 1 : sub.SyncedPageCount;
for (int i = startPage; i <= totalPages; i++)
{
var records = entites.Skip((i - 1) * pageSize)
.Take(pageSize).ToList();
#region dto转换作为参数发给客户API 因为实体比DTO字段多
@ -248,9 +227,10 @@ namespace TaskManager.Controllers
{
itm.WriteState = true;
}
var result = await PostPageAsync(pagedRequest,sub.TaskId, DateTime.Now.ToString("yyyyMMdd"));
var result = await PostPageAsync(pagedRequest,sub.TaskId,version);
if(result.code == 200)
{
await _logger.AddSuccess($"第 {i} 页奇瑞数据保存成功", TaskName, sub.TaskId, version);
_jobDbContext.BulkUpdate(records,options=>options.UseTableLock=true);
sub.SyncedPageCount = i;
if (i == totalPages)
@ -258,14 +238,14 @@ namespace TaskManager.Controllers
sub.WriteState = true;
_jobDbContext.Set<TaskSub>().Update(sub);
_jobDbContext.SaveChanges();
await _logger.AddSuccess($"奇瑞数{sub.TaskId}任务完成据保存成功", TaskName, sub.TaskId, version);
}
}
else
{
sub.FailedCount = i*pageSize;
sub.FailedInfo = $"第 {i} 页奇瑞数据保存失败 {result.message}。";
await _logger.AddError($"第 {i} 页奇瑞数据保存失败 {result.message}。", TaskName,sub.TaskId, DateTime.Now.ToString("yyyyMMdd"));
await _logger.AddError($"第 {i} 页奇瑞数据保存失败 {result.message}。", TaskName,sub.TaskId, version);
}
}
@ -273,7 +253,6 @@ namespace TaskManager.Controllers
}
}
}
[HttpGet]

1
API/Wood.Service/Controllers/CheryRecurringJobInputPageExtendController.cs

@ -248,7 +248,6 @@ namespace TaskManager.Controllers
{
await _logger.AddError(ex.Message, TaskName, taskId, DateTime.Now.ToString("yyyyMMdd"));
await transaction.RollbackAsync();
}
}
}

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

@ -50,46 +50,31 @@ namespace TaskManager.Controllers
}
private async Task InsertDataAsync(List<T> list)
{
if (list.Any())
{
using (var transaction = await _jobDbContext.Database.BeginTransactionAsync())
using (var transaction = await _jobDbContext.Database.BeginTransactionAsync(IsolationLevel.ReadCommitted))
{
var tran = transaction.GetDbTransaction();
var taskId=list.First().TaskId;
var version = list.First().RequestDate.Replace("-", string.Empty);
List<TLOGS> logs = new List<TLOGS>();
foreach (var itm in list)
{
TLOGS entity = new TLOGS();
entity.InjectFrom(itm);
}
try
{
List<TLOGS> logs = new List<TLOGS>();
foreach (var itm in list)
{
TLOGS entity = new TLOGS();
entity.InjectFrom(itm);
}
await _jobDbContext.BulkMergeAsync(list, options => { options.ColumnPrimaryKeyExpression = p => p.Id; });
await _jobDbContext.BulkMergeAsync(logs, options => { options.ColumnPrimaryKeyExpression = p =>new { p.Id,p.RequestDate }; });
await _jobDbContext.BulkMergeAsync(list, options => { options.ColumnPrimaryKeyExpression = p => p.Id; options.Transaction = tran; });
await _jobDbContext.BulkMergeAsync(logs, options => { options.ColumnPrimaryKeyExpression = p =>new { p.Id,p.RequestDate };options.Transaction = tran; });
//});
await ConfirmDataInsertAsync(list, _jobDbContext, tran);
// 提交事务
await transaction.CommitAsync();
}
catch (Exception ex)
{
@ -117,12 +102,12 @@ namespace TaskManager.Controllers
if (firstResponse == null || firstResponse.Code != 200)
{
await _logger.AddError("首次请求失败,无法获取分页信息。", TaskName,taskId,version);
await _logger.AddInfo("首次请求失败,无法获取分页信息。", TaskName,taskId,version);
return allData;
}
if (firstResponse.Data.Total == "0")
{
await _logger.AddInfo("首次请求失败,Total为0是否已经全部读取过。", TaskName, taskId, version);
await _logger.AddInfo("首次请求失败,Total为0已经全部读取过。", TaskName, taskId, version);
return allData;
}
if (readedcount != int.Parse(firstResponse.Data.Total))//记录数不相等
@ -181,7 +166,7 @@ namespace TaskManager.Controllers
{
PAGE_DTO pageinput = new PAGE_DTO() { Date = date, PageNum = currentPage, PageSize = CPageSize, IsForce = false };
Console.WriteLine($"正在请求第 {currentPage} 页...");
//Console.WriteLine($"正在请求第 {currentPage} 页...");
PagedResponse<ToutputDetial> pageResponse = await GetPageAsync(pageinput, taskId, version);
if (pageResponse?.Data.Rows != null && pageResponse.Data.Rows.Count > 0)
{
@ -226,9 +211,6 @@ namespace TaskManager.Controllers
{
await InsertDataAsync(pageList);
}
}
else
@ -246,6 +228,9 @@ namespace TaskManager.Controllers
else
{
PagedResponse<ToutputDetial> firstResponse = await GetPageAsync(new PAGE_DTO() { Date = date, PageSize = CPageSize, IsForce = true },taskId,version);
if (firstResponse == null || firstResponse.Code != 200)
{
@ -254,7 +239,7 @@ namespace TaskManager.Controllers
}
if (firstResponse.Data.Total == "0")
{
await _logger.AddInfo("首次请求失败,Total为0是否已经全部读取过。", TaskName, taskId, version);
await _logger.AddInfo("首次请求失败,Total为0已经全部读取过。", TaskName, taskId, version);
return allData;
}
@ -330,7 +315,7 @@ namespace TaskManager.Controllers
{
await InsertDataAsync(pageList);
}
//await _logger.AddInfo($"成功获取 {pageResponse.Data.Rows.Count} 条记录", TaskName);
await _logger.AddSuccess($"成功获取 {pageResponse.Data.Rows.Count} 条记录", TaskName,taskId,version);
}
else
{
@ -339,7 +324,7 @@ namespace TaskManager.Controllers
// 简单的请求间隔,避免过于频繁
await Task.Delay(200);
}
await _logger.AddInfo($"所有数据获取完成,总共获取了 {allData.Count} 条记录", TaskName, taskId, version);
await _logger.AddSuccess($"所有数据获取完成,总共获取了 {allData.Count} 条记录", TaskName, taskId, version);
}
}
@ -350,9 +335,10 @@ namespace TaskManager.Controllers
private async Task<PagedResponse<ToutputDetial>> GetPageAsync(PAGE_DTO input,Guid taskId,string version)
{
string inputjson = string.Empty;
try
{
var inputjson = JsonSerializer.Serialize(input,
inputjson = JsonSerializer.Serialize(input,
new JsonSerializerOptions
{
PropertyNamingPolicy = JsonNamingPolicy.CamelCase,
@ -376,13 +362,13 @@ namespace TaskManager.Controllers
}
else
{
await _logger.AddError($"调用接口无返回值{Url}", TaskName, taskId, version);
await _logger.AddInfo($"调用接口无返回值{Url}", TaskName, taskId, version);
return null;
}
}
catch (Exception ex)
{
await _logger.AddError($"调用接口无返回值错误{ex.Message}", TaskName, taskId, version);
await _logger.AddError($"调用接口无返回值错误{ex.Message}", TaskName, taskId, version,inputjson);
return null;
}

17
API/Wood.Service/Controllers/CherySupplierConDateService.cs

@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Storage;
using System.Collections.Generic;
using TaskManager.Contracts.Dtos;
using TaskManager.Entity;
using TaskManager.Entity.Entitys;
@ -41,6 +42,18 @@ namespace TaskManager.Controllers
public async Task<ActionResult> Confirm([FromBody] List<SUPPLIER_CON_DATE> entites)
{
if (entites.Any(p =>
string.IsNullOrEmpty(p.SupplierCode) ||
string.IsNullOrEmpty(p.ReleaseEdition) ||
string.IsNullOrEmpty(p.MaterialCode) ||
string.IsNullOrEmpty(p.PlantId) ||
string.IsNullOrEmpty(p.FeedbackResults)
))
{
return new JsonResult(new { Code = 400, Message = "请检查需求发布版次、供应商代码、零件号、工厂代码、起始日期、反馈结果不能为空!" });
}
var taskId = Guid.NewGuid();
var task = new TaskSub();
task.TaskId = taskId;
@ -54,7 +67,7 @@ namespace TaskManager.Controllers
task.CreateTime = DateTime.Now;
task.CreateUser = "admin";
task.CreationTime = DateTime.Now;
task.SyncedPageCount = 1;
task.SyncedPageCount = 0;
entites.ForEach(p =>
{
p.ReadState = true;
@ -76,7 +89,7 @@ namespace TaskManager.Controllers
catch (Exception ex)
{
await transaction.RollbackAsync();
return new JsonResult(new { Code = 400, Message = ex.Message });
return new JsonResult(new { Code = 400, Message = ex.Message });
}
}

12
API/Wood.Service/Controllers/CherySupplierConMmrpService.cs

@ -43,6 +43,18 @@ namespace TaskManager.Controllers
public async Task<ActionResult> Confirm([FromBody] List<SUPPLIER_CON_MMRP> entites)
{
if (entites.Any(p =>
string.IsNullOrEmpty(p.SupplierCode) ||
string.IsNullOrEmpty(p.ReleaseEdition) ||
string.IsNullOrEmpty(p.MaterialCode) ||
string.IsNullOrEmpty(p.PlantId) ||
string.IsNullOrEmpty(p.FeedbackResults)
))
{
return new JsonResult(new { Code = 400, Message = "请检查需求发布版次、供应商代码、零件号、工厂代码、起始日期、反馈结果不能为空!" });
}
var taskId = Guid.NewGuid();
var task = new TaskSub();
task.TaskId = taskId;

16
API/Wood.Service/Controllers/CherySupplierConPoService.cs

@ -1,6 +1,7 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.EntityFrameworkCore;
using Microsoft.EntityFrameworkCore.Storage;
using System.Collections.Generic;
using TaskManager.Contracts.Dtos;
using TaskManager.Entity;
using TaskManager.Entity.Entitys;
@ -42,6 +43,19 @@ namespace TaskManager.Controllers
public async Task<ActionResult> Confirm([FromBody] List<SUPPLIER_CON_PO> entites)
{
if (entites.Any(p =>
string.IsNullOrEmpty(p.SupplierCode) ||
string.IsNullOrEmpty(p.PurchaseOrder) ||
string.IsNullOrEmpty(p.SerialNumber) ||
string.IsNullOrEmpty(p.FeedbackResults)
))
{
return new JsonResult(new { Code = 400, Message = "请检查采购订单号、供应商代码、行项目号、满足数量、反馈结果、反馈结果不能为空!" });
}
var taskId = Guid.NewGuid();
var task = new TaskSub();
task.TaskId = taskId;
@ -58,8 +72,6 @@ namespace TaskManager.Controllers
task.SyncedPageCount = 0;
task.ReadState = true;
entites.ForEach(p =>
{
p.ReadState = true;

2
API/Wood.Service/Controllers/CherySupplierMrpDataService.cs

@ -31,7 +31,7 @@ namespace TaskManager.Controllers
con.ReleaseEdition = p.ReleaseEdition;
con.MaterialCode = p.MaterialCode;
con.PlantId = p.PlantId;
con.FeedbackResults = "";
con.FeedbackResults = "0";
con.VentureType = "";
con.VentureSpecific = "";
con.Measures = "";

2
API/Wood.Service/Controllers/CherySupplierPoService.cs

@ -30,7 +30,7 @@ namespace TaskManager.Controllers
con.PurchaseOrder =p.PurchaseOrder ;
con.SerialNumber =p.SerialNumber ;
con.QuantityMeet =p.QuantityDelivery==null? p.QuantityDelivery.Value : 0 ;
con.FeedbackResults ="" ;
con.FeedbackResults ="0" ;
con.VentureType ="" ;
con.VentureSpecific ="" ;
con.Measures ="";

174
API/Wood.Service/Controllers/CustomLogService.cs

@ -1,4 +1,6 @@
using Microsoft.Extensions.Configuration;
using Hangfire;
using Microsoft.AspNetCore.Mvc;
using Microsoft.Extensions.Configuration;
using System;
using System.Collections.Generic;
using System.Linq;
@ -14,8 +16,178 @@ namespace Wood.Service.Controllers
/// </summary>
public class CustomLogService : NormalBaseController<TaskLog>
{
private readonly string _logDirectory;
public CustomLogService(JobDbContext context, IServiceProvider builder, IConfiguration configuration, IRepository<TaskLog> repository) : base(context, builder, configuration, repository)
{
_logDirectory = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "CustomLogs");
}
[HttpGet]
public async Task<IActionResult> GetLogResponseList(int uId)
{
var first = _context.TaskLogs.FirstOrDefault(x => x.UId == uId);
if (!string.IsNullOrEmpty(first.Path))
{
string fullDatePath = Path.Combine(_logDirectory, first.Path);
string jsonContent = await System.IO.File.ReadAllTextAsync(fullDatePath);
return new JsonResult(new { Code = 200, Message =jsonContent });
}
return new JsonResult(new { Code = 400, Message = "没找到文件!" });
//switch (first.TaskName)
//{
// case "来料检验数据":
// // 移除指定的定时任务
// break;
// case "排产数据":
// // 移除指定的定时任务
// break;
// case "供应商基础信息":
// // 移除指定的定时任务
// break;
// case "人员资质信息":
// // 移除指定的定时任务
// break;
// case "BOM主数据":
// // 移除指定的定时任务
// break;
// case "过程控制项质量数据":
// // 移除指定的定时任务
// break;
// case "生产过程数据":
// // 移除指定的定时任务
// break;
// case "产品一次合格率":
// // 移除指定的定时任务
// break;
// case "工位一次合格率":
// // 移除指定的定时任务
// break;
// case "缺陷业务数据":
// // 移除指定的定时任务
// break;
// case "环境业务数据":
// // 移除指定的定时任务
// break;
// case "设备OEE达成率":
// // 移除指定的定时任务
// break;
// case "OEE时间明细":
// // 移除指定的定时任务
// break;
// case "物料主数据":
// // 移除指定的定时任务
// break;
// case "工艺装备":
// // 移除指定的定时任务
// break;
// case "工艺":
// // 移除指定的定时任务
// break;
// case "整车月度生产计划1":
// // 移除指定的定时任务
// break;
// case "M+6月物料需求计划1":
// // 移除指定的定时任务
// break;
// case "整车月度生产计划2":
// // 移除指定的定时任务
// break;
// case "M+6月物料需求计划2":
// // 移除指定的定时任务
// break;
// case "日物料需求计划":
// // 移除指定的定时任务
// break;
// case "计划协议":
// // 移除指定的定时任务
// break;
// case "采购订单":
// // 移除指定的定时任务
// break;
// case "过焊装未过总装":
// // 移除指定的定时任务
// break;
// case "过涂装未过总装":
// // 移除指定的定时任务
// break;
// case "排序供货":
// // 移除指定的定时任务
// break;
// case "看板配送单":
// // 移除指定的定时任务
// break;
// case "退货单":
// // 移除指定的定时任务
// break;
// case "奇瑞RDC共享库存":
// // 移除指定的定时任务
// break;
// case "日MRP状态监控":
// // 移除指定的定时任务
// break;
// case "日MRP预警推移":
// // 移除指定的定时任务
// break;
// case "M+6月物料需求计划风险确认":
// // 移除指定的定时任务
// break;
// case "日物料需求计划风险确认":
// // 移除指定的定时任务
// break;
// case "采购订单风险确认":
// // 移除指定的定时任务
// break;
// case "供应商共享库存-上午":
// // 移除指定的定时任务
// break;
// case "供应商共享库存-晚上":
// // 移除指定的定时任务
// break;
//}
}
}
}

237
API/Wood.Service/Controllers/LogConsumerService.cs

@ -70,23 +70,20 @@ namespace TaskManager.Controllers
{
var logs = new List<TaskLog>();
int count = 0;
// 读取一批日志
while (_logReader.TryRead(out var log) && count < BatchSize)
{
logs.Add(log);
count++;
}
if (logs.Any())
{
using var scope = _serviceProvider.CreateScope();
var db = scope.ServiceProvider.GetRequiredService<JobDbContext>();
List<TaskLog> logsToSave = new List<TaskLog>();
foreach (var log in logs)
{
if (!string.IsNullOrEmpty(log.Remark) && log.Type=="请求")
if (!string.IsNullOrEmpty(log.Remark))
{
log.Path = WriteLogToFile(log.Remark);
}
@ -94,238 +91,6 @@ namespace TaskManager.Controllers
logsToSave.Add(log);
}
//foreach (var log in logsToSave)
//{
// switch (log.TaskName)
// {
// case "来料检验数据":
// //RecurringJob.AddOrUpdate<SupplierProMaterialStockService>(
// // task.TaskName,
// // x => ((IDoExecute)x).ExecuteAsync(url, path, task.TaskName, client, pagesize),
// // task.Corn,
// // TimeZoneInfo.Local
// //);
// break;
// case "排产数据":
// //RecurringJob.AddOrUpdate<CherySupplierProSchedulingService>(
// // task.TaskName,
// // x => ((IDoExecute)x).ExecuteAsync(url, path, task.TaskName, client, pagesize),
// // task.Corn,
// // TimeZoneInfo.Local
// //);
// break;
// case "供应商基础信息":
// //RecurringJob.AddOrUpdate<CherySupplierInfoService>(
// // task.TaskName,
// // x => ((IDoExecute)x).ExecuteAsync(url, path, task.TaskName, client, pagesize),
// // task.Corn,
// // TimeZoneInfo.Local
// //);
// break;
// case "人员资质信息":
// //RecurringJob.AddOrUpdate<CherySupplierEmployeeService>(
// // task.TaskName,
// // x => ((IDoExecute)x).ExecuteAsync(url, path, task.TaskName, client, pagesize),
// // task.Corn,
// // TimeZoneInfo.Local
// //);
// break;
// case "BOM主数据":
// //RecurringJob.AddOrUpdate<CherySupplierBomService>(
// // task.TaskName,
// // x => ((IDoExecute)x).ExecuteAsync(url, path, task.TaskName, client, pagesize),
// // task.Corn,
// // TimeZoneInfo.Local
// //);
// break;
// case "过程控制项质量数据":
// //RecurringJob.AddOrUpdate<CherySupplierProCpsService>(
// // task.TaskName,
// // x => ((IDoExecute)x).ExecuteAsync(url, path, task.TaskName, client, pagesize),
// // task.Corn,
// // TimeZoneInfo.Local
// //);
// break;
// case "生产过程数据":
// //RecurringJob.AddOrUpdate<CherySupplierProDataService>(
// // task.TaskName,
// // x => ((IDoExecute)x).ExecuteAsync(url, path, task.TaskName, client, pagesize),
// // task.Corn,
// // TimeZoneInfo.Local
// //);
// break;
// case "产品一次合格率":
// //RecurringJob.AddOrUpdate<CherySupplierProFirstPassyieldService>(
// // task.TaskName,
// // x => ((IDoExecute)x).ExecuteAsync(url, path, task.TaskName, client, pagesize),
// // task.Corn,
// // TimeZoneInfo.Local
// //);
// break;
// case "工位一次合格率":
// //RecurringJob.AddOrUpdate<CherySupplierProStationFirstPassyieldService>(
// // task.TaskName,
// // x => ((IDoExecute)x).ExecuteAsync(url, path, task.TaskName, client, pagesize),
// // task.Corn,
// // TimeZoneInfo.Local
// //);
// break;
// case "缺陷业务数据":
// //RecurringJob.AddOrUpdate<CherySupplierProFlawService>(
// // task.TaskName,
// // x => ((IDoExecute)x).ExecuteAsync(url, path, task.TaskName, client, pagesize),
// // task.Corn,
// // TimeZoneInfo.Local
// //);
// break;
// case "环境业务数据":
// //RecurringJob.AddOrUpdate<CherySupplierProEnvironmentService>(
// // task.TaskName,
// // x => ((IDoExecute)x).ExecuteAsync(url, path, task.TaskName, client, pagesize),
// // task.Corn,
// // TimeZoneInfo.Local
// //);
// break;
// case "设备OEE达成率":
// //RecurringJob.AddOrUpdate<CherySupplierProOeeAchievementRateService>(
// // task.TaskName,
// // x => ((IDoExecute)x).ExecuteAsync(url, path, task.TaskName, client, pagesize),
// // task.Corn,
// // TimeZoneInfo.Local
// //);
// break;
// case "OEE时间明细":
// //RecurringJob.AddOrUpdate<CherySupplierProOeeTimeDetailsService>(
// // task.TaskName,
// // x => ((IDoExecute)x).ExecuteAsync(url, path, task.TaskName, client, pagesize),
// // task.Corn,
// // TimeZoneInfo.Local
// //);
// break;
// case "物料主数据":
// //RecurringJob.AddOrUpdate<CherySupplierProMaterialDataService>(
// // task.TaskName,
// // x => ((IDoExecute)x).ExecuteAsync(url, path, task.TaskName, client, pagesize),
// // task.Corn,
// // TimeZoneInfo.Local
// //);
// break;
// case "附件类数据":
// //RecurringJob.AddOrUpdate<CherySupplierProAttachmentDataService>(
// // task.TaskName,
// // x => ((IDoExecute)x).ExecuteAsync(url, path, task.TaskName, client, pagesize),
// // task.Corn,
// // TimeZoneInfo.Local
// //);
// break;
// case "工艺装备":
// //RecurringJob.AddOrUpdate<CherySupplierProProcessEquipmentService>(
// // task.TaskName,
// // x => ((IDoExecute)x).ExecuteAsync(url, path, task.TaskName, client, pagesize),
// // task.Corn,
// // TimeZoneInfo.Local
// //);
// break;
// case "工艺":
// //RecurringJob.AddOrUpdate<CherySupplierProProcessService>(
// // task.TaskName,
// // x => ((IDoExecute)x).ExecuteAsync(url, path, task.TaskName, client, pagesize),
// // task.Corn,
// // TimeZoneInfo.Local
// //);
// break;
// case "整车月度生产计划1":
// var planlingResult1 = Response<SUPPLIER_PRO_PLANING, SUPPLIER_PRO_PLANING_DETIAL_DTO>(log.Remark, log.Version,log.TaskId,db);
// break;
// case "M+6月物料需求计划1":
// var monthResult = Response<SUPPLIER_MRP_MONTH, SUPPLIER_MRP_MONTH_DETAIL_DTO>(log.Remark, log.Version,log.TaskId,db);
// break;
// case "整车月度生产计划2":
// var planlingResult2=Response<SUPPLIER_PRO_PLANING, SUPPLIER_PRO_PLANING_DETIAL_DTO>(log.Remark,log.Version, log.TaskId, db);
// break;
// case "M+6月物料需求计划2":
// var monthResult2 = Response<SUPPLIER_MRP_MONTH, SUPPLIER_MRP_MONTH_DETAIL_DTO>(log.Remark, log.Version,log.TaskId,db);
// break;
// case "日物料需求计划":
// var dateResult2 = Response<SUPPLIER_MRP_DATE, SUPPLIER_MRP_DATE_DETAIL_DTO>(log.Remark, log.Version, log.TaskId, db);
// break;
// case "计划协议":
// var weekResult = Response<SUPPLIER_SA_WEEK, SUPPLIER_SA_WEEK_DETAIL_DTO>(log.Remark, log.Version, log.TaskId, db);
// break;
// case "采购订单":
// var poResult = Response<SUPPLIER_PO, SUPPLIER_PO_DETAIL_DTO>(log.Remark, log.Version, log.TaskId, db);
// break;
// case "过焊装未过总装":
// var GHResult = Response<SUPPLIER_PRO_HSCHEDUL, SUPPLIER_PO_DETAIL_DTO>(log.Remark, log.Version, log.TaskId, db);
// break;
// case "过涂装未过总装":
// var TSResult = Response<SUPPLIER_PRO_TSCHEDUL, SUPPLIER_PRO_TSCHEDUL_DETAIL_DTO>(log.Remark, log.Version, log.TaskId, db);
// break;
// case "排序供货":
// var CSResult = Response<SUPPLIER_PRO_CSCHEDUL, SUPPLIER_PRO_CSCHEDUL_DETAIL_DTO>(log.Remark, log.Version, log.TaskId, db);
// break;
// case "看板配送单":
// var DELResult = Response<SUPPLIER_DEL_STATE, SUPPLIER_DEL_STATE_DETAIL_DTO>(log.Remark, log.Version, log.TaskId, db);
// break;
// case "退货单":
// var ReturnResult = Response<SUPPLIER_RETURN, SUPPLIER_RETURN_DETAIL_DTO>(log.Remark, log.Version, log.TaskId, db);
// break;
// case "奇瑞RDC共享库存":
// var InvDataResult = Response<SUPPLIER_INV_DATA, SUPPLIER_INV_DATA_DETAIL_DTO>(log.Remark, log.Version, log.TaskId, db);
// break;
// case "日MRP状态监控":
// var MrpDateResult = Response<SUPPLIER_MRP_DATE, SUPPLIER_MRP_DATE_DETAIL_DTO>(log.Remark, log.Version, log.TaskId, db);
// break;
// case "日MRP预警推移":
// var WarningResult = Response<SUPPLIER_MRP_WARNING, SUPPLIER_MRP_WARNING_DETAIL_DTO>(log.Remark, log.Version, log.TaskId, db);
// break;
// case "M+6月物料需求计划风险确认":
// //RecurringJob.AddOrUpdate<CherySupplierConMmrpService>(
// // task.TaskName,
// // x => ((IDoExecute)x).ExecuteAsync(url, path, task.TaskName, client, pagesize),
// // task.Corn,
// // TimeZoneInfo.Local
// //);
// break;
// case "日物料需求计划风险确认":
// //RecurringJob.AddOrUpdate<CherySupplierConDateService>(
// // task.TaskName,
// // x => ((IDoExecute)x).ExecuteAsync(url, path, task.TaskName, client, pagesize),
// // task.Corn,
// // TimeZoneInfo.Local
// //);
// break;
// case "采购订单风险确认":
// //RecurringJob.AddOrUpdate<CherySupplierConPoService>(
// // task.TaskName,
// // x => ((IDoExecute)x).ExecuteAsync(url, path, task.TaskName, client, pagesize),
// // task.Corn,
// // TimeZoneInfo.Local
// //);
// break;
// case "供应商共享库存-上午":
// //RecurringJob.AddOrUpdate<CherySupplierSinvDataService>(
// // task.TaskName,
// // x => ((IDoExecute)x).ExecuteAsync(url, path, task.TaskName, client, pagesize),
// // task.Corn,
// // TimeZoneInfo.Local
// //);
// break;
// case "供应商共享库存-晚上":
// //RecurringJob.AddOrUpdate<CherySupplierSinvDataService>(
// // task.TaskName,
// // x => ((IDoExecute)x).ExecuteAsync(url, path, task.TaskName, client, pagesize),
// // task.Corn,
// // TimeZoneInfo.Local
// //);
// break;
// }
//}
await db.TaskLogs.AddRangeAsync(logsToSave, stoppingToken);
await db.SaveChangesAsync(stoppingToken);
_logger.LogInformation($"已写入 {logs.Count} 条日志");

32
API/Wood.Service/Controllers/LogController.cs

@ -91,9 +91,7 @@ namespace TaskManager.Controllers
Version = version?.ToString()
};
EnqueueLog(log);
//_context.TaskLogs.Add(log);
//var result = await _context.SaveChangesAsync();
return true; // 日志已入队,视为成功
}
@ -116,8 +114,7 @@ namespace TaskManager.Controllers
};
EnqueueLog(log);
//_context.TaskLogs.Add(log);
//var result = await _context.SaveChangesAsync();
return true; // 日志已入队,视为成功
}
@ -137,11 +134,32 @@ namespace TaskManager.Controllers
Version = version?.ToString()
};
EnqueueLog(log);
//_context.TaskLogs.Add(log);
//var result = await _context.SaveChangesAsync();
return true;
}
[NonAction]
public async Task<bool> AddSuccess(string message, string taskname, Guid taskid, string version)
{
var log = new TaskLog
{
Info = message,
Type = "成功",
TaskName = taskname,
CreationTime = DateTime.Now,
TaskId = taskid,
Version = version?.ToString()
};
EnqueueLog(log);
return true;
}
[NonAction]
//[HttpGet("AddPostRequest")]
public async Task<bool> AddPostRequest(string message, string taskname, Guid taskid, string version, string remark)

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

@ -90,13 +90,13 @@ namespace TaskManager.Controllers
var response = await _httpClient.SendAsync(request);
response.EnsureSuccessStatusCode(); // 抛出异常处理状态码
var str = await response.Content.ReadAsStringAsync();
await _logger.AddPostResponse("响应", TaskName, taskid, version, str);
//await _logger.AddPostResponse("响应", TaskName, taskid, version, str);
return str;
}
catch (HttpRequestException ex)
{
await _logger.AddError(ex.Message, this.TaskName, taskid, version);
await _logger.AddError(ex.Message, this.TaskName, taskid, version,jsonData);
return string.Empty;
}

Loading…
Cancel
Save