Merge branch 'main' of https://git.is.ulstu.ru/DavidMakarov/PIbd-21_Makarov_Razubaev_CourseWork
This commit is contained in:
commit
45f2a7cc3b
@ -23,4 +23,8 @@
|
|||||||
<ProjectReference Include="..\FactoryContracts\FactoryContracts.csproj" />
|
<ProjectReference Include="..\FactoryContracts\FactoryContracts.csproj" />
|
||||||
</ItemGroup>
|
</ItemGroup>
|
||||||
|
|
||||||
|
<ItemGroup>
|
||||||
|
<Folder Include="Migrations\" />
|
||||||
|
</ItemGroup>
|
||||||
|
|
||||||
</Project>
|
</Project>
|
||||||
|
@ -12,8 +12,8 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|||||||
namespace FactoryDatabaseImplement.Migrations
|
namespace FactoryDatabaseImplement.Migrations
|
||||||
{
|
{
|
||||||
[DbContext(typeof(FactoryDatabase))]
|
[DbContext(typeof(FactoryDatabase))]
|
||||||
[Migration("20240528144223_InitCreate")]
|
[Migration("20240529212521_Init")]
|
||||||
partial class InitCreate
|
partial class Init
|
||||||
{
|
{
|
||||||
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
protected override void BuildTargetModel(ModelBuilder modelBuilder)
|
||||||
{
|
{
|
||||||
@ -71,7 +71,8 @@ namespace FactoryDatabaseImplement.Migrations
|
|||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<int>("PlanProductionId")
|
b.Property<int?>("PlanProductionId")
|
||||||
|
.IsRequired()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<int>("Status")
|
b.Property<int>("Status")
|
||||||
@ -81,8 +82,7 @@ namespace FactoryDatabaseImplement.Migrations
|
|||||||
|
|
||||||
b.HasIndex("ClientId");
|
b.HasIndex("ClientId");
|
||||||
|
|
||||||
b.HasIndex("PlanProductionId")
|
b.HasIndex("PlanProductionId");
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("ExecutionPhases");
|
b.ToTable("ExecutionPhases");
|
||||||
});
|
});
|
||||||
@ -345,8 +345,8 @@ namespace FactoryDatabaseImplement.Migrations
|
|||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
b.HasOne("FactoryDatabaseImplement.Models.PlanProduction", "PlanProduction")
|
b.HasOne("FactoryDatabaseImplement.Models.PlanProduction", "PlanProduction")
|
||||||
.WithOne("ExecutionPhase")
|
.WithMany()
|
||||||
.HasForeignKey("FactoryDatabaseImplement.Models.ExecutionPhase", "PlanProductionId")
|
.HasForeignKey("PlanProductionId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
@ -518,9 +518,6 @@ namespace FactoryDatabaseImplement.Migrations
|
|||||||
|
|
||||||
modelBuilder.Entity("FactoryDatabaseImplement.Models.PlanProduction", b =>
|
modelBuilder.Entity("FactoryDatabaseImplement.Models.PlanProduction", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("ExecutionPhase")
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Machines");
|
b.Navigation("Machines");
|
||||||
|
|
||||||
b.Navigation("Workpieces");
|
b.Navigation("Workpieces");
|
@ -6,7 +6,7 @@ using Npgsql.EntityFrameworkCore.PostgreSQL.Metadata;
|
|||||||
|
|
||||||
namespace FactoryDatabaseImplement.Migrations
|
namespace FactoryDatabaseImplement.Migrations
|
||||||
{
|
{
|
||||||
public partial class InitCreate : Migration
|
public partial class Init : Migration
|
||||||
{
|
{
|
||||||
protected override void Up(MigrationBuilder migrationBuilder)
|
protected override void Up(MigrationBuilder migrationBuilder)
|
||||||
{
|
{
|
||||||
@ -287,8 +287,7 @@ namespace FactoryDatabaseImplement.Migrations
|
|||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_ExecutionPhases_PlanProductionId",
|
name: "IX_ExecutionPhases_PlanProductionId",
|
||||||
table: "ExecutionPhases",
|
table: "ExecutionPhases",
|
||||||
column: "PlanProductionId",
|
column: "PlanProductionId");
|
||||||
unique: true);
|
|
||||||
|
|
||||||
migrationBuilder.CreateIndex(
|
migrationBuilder.CreateIndex(
|
||||||
name: "IX_MachinePlanProductions_MachineId",
|
name: "IX_MachinePlanProductions_MachineId",
|
@ -69,7 +69,8 @@ namespace FactoryDatabaseImplement.Migrations
|
|||||||
.IsRequired()
|
.IsRequired()
|
||||||
.HasColumnType("text");
|
.HasColumnType("text");
|
||||||
|
|
||||||
b.Property<int>("PlanProductionId")
|
b.Property<int?>("PlanProductionId")
|
||||||
|
.IsRequired()
|
||||||
.HasColumnType("integer");
|
.HasColumnType("integer");
|
||||||
|
|
||||||
b.Property<int>("Status")
|
b.Property<int>("Status")
|
||||||
@ -79,8 +80,7 @@ namespace FactoryDatabaseImplement.Migrations
|
|||||||
|
|
||||||
b.HasIndex("ClientId");
|
b.HasIndex("ClientId");
|
||||||
|
|
||||||
b.HasIndex("PlanProductionId")
|
b.HasIndex("PlanProductionId");
|
||||||
.IsUnique();
|
|
||||||
|
|
||||||
b.ToTable("ExecutionPhases");
|
b.ToTable("ExecutionPhases");
|
||||||
});
|
});
|
||||||
@ -343,8 +343,8 @@ namespace FactoryDatabaseImplement.Migrations
|
|||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
b.HasOne("FactoryDatabaseImplement.Models.PlanProduction", "PlanProduction")
|
b.HasOne("FactoryDatabaseImplement.Models.PlanProduction", "PlanProduction")
|
||||||
.WithOne("ExecutionPhase")
|
.WithMany()
|
||||||
.HasForeignKey("FactoryDatabaseImplement.Models.ExecutionPhase", "PlanProductionId")
|
.HasForeignKey("PlanProductionId")
|
||||||
.OnDelete(DeleteBehavior.Cascade)
|
.OnDelete(DeleteBehavior.Cascade)
|
||||||
.IsRequired();
|
.IsRequired();
|
||||||
|
|
||||||
@ -516,9 +516,6 @@ namespace FactoryDatabaseImplement.Migrations
|
|||||||
|
|
||||||
modelBuilder.Entity("FactoryDatabaseImplement.Models.PlanProduction", b =>
|
modelBuilder.Entity("FactoryDatabaseImplement.Models.PlanProduction", b =>
|
||||||
{
|
{
|
||||||
b.Navigation("ExecutionPhase")
|
|
||||||
.IsRequired();
|
|
||||||
|
|
||||||
b.Navigation("Machines");
|
b.Navigation("Machines");
|
||||||
|
|
||||||
b.Navigation("Workpieces");
|
b.Navigation("Workpieces");
|
||||||
|
@ -302,6 +302,11 @@ namespace FactoryWorkerApp.Controllers
|
|||||||
DateFrom = startDate,
|
DateFrom = startDate,
|
||||||
DateTo = endDate,
|
DateTo = endDate,
|
||||||
});
|
});
|
||||||
|
foreach( var report in reports)
|
||||||
|
{
|
||||||
|
if (report.Machines == null)
|
||||||
|
report.Machines = new();
|
||||||
|
}
|
||||||
return View(reports);
|
return View(reports);
|
||||||
|
|
||||||
|
|
||||||
|
@ -7,7 +7,7 @@
|
|||||||
ViewData["Title"] = "Execution Phase";
|
ViewData["Title"] = "Execution Phase";
|
||||||
}
|
}
|
||||||
<div class="text-center">
|
<div class="text-center">
|
||||||
<h2 class="display-4">Заготовка</h2>
|
<h2 class="display-4">Этап выполнения</h2>
|
||||||
</div>
|
</div>
|
||||||
<form method="post">
|
<form method="post">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
|
|
||||||
<p>
|
<p>
|
||||||
<a asp-action="PlanProduction">Создать план</a>
|
<a asp-action="PlanProduction">Создать план</a>
|
||||||
<a asp-action="ConnectionPlanProductionWorkpiece">Привязка планов производства к заготовкам</a>
|
<a asp-action="ConnectionPlanProductionWorkpiece">Привязка заготовок к планам производства</a>
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
<table class="table">
|
<table class="table">
|
||||||
|
Loading…
Reference in New Issue
Block a user