some fixes

This commit is contained in:
DavidMakarov 2024-05-30 01:18:04 +04:00
parent 3f010876a1
commit c9c8d4c564
17 changed files with 37 additions and 135 deletions

View File

@ -7,7 +7,7 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FactoryDataModels", "Factor
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FactoryContracts", "FactoryContracts\FactoryContracts.csproj", "{87BA79A9-CF35-4CB4-98BD-86C01918C81C}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FactoryBuisinessLogic", "FactoryBuisinessLogic\FactoryBuisinessLogic.csproj", "{EA960B3E-6BFB-4B16-9B0A-E1D603967FEC}"
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FactoryBusinessLogic", "FactoryBuisinessLogic\FactoryBusinessLogic.csproj", "{EA960B3E-6BFB-4B16-9B0A-E1D603967FEC}"
EndProject
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "FactoryDatabaseImplement", "FactoryDatabaseImplement\FactoryDatabaseImplement.csproj", "{AC09F9B2-8744-4C66-AD47-33A35613BC40}"
EndProject

View File

@ -116,21 +116,21 @@ namespace FactoryBusinessLogic.OfficePackage
});
var tupleList = machineNames.Zip(phaseNames, Tuple.Create);
foreach (var tuple in tupleList)
{
CreateRow(new PdfRowParameters
{
Texts = new List<string>
{
string.Empty,
tuple.Item1,
tuple.Item2,
},
Style = "Normal",
ParagraphAlignment = PdfParagraphAlignmentType.Left
});
}
//var tupleList = machineNames.Zip(phaseNames, Tuple.Create);
//foreach (var tuple in tupleList)
//{
// CreateRow(new PdfRowParameters
// {
// Texts = new List<string>
// {
// string.Empty,
// tuple.Item1,
// tuple.Item2,
// },
// Style = "Normal",
// ParagraphAlignment = PdfParagraphAlignmentType.Left
// });
//}
}
SaveWorkerPdf(info);
}

View File

@ -111,6 +111,7 @@ namespace FactoryDatabaseImplement.Implements
.Include(x => x.Client)
.Include(x => x.PlanProductions)
.ThenInclude(x => x.PlanProduction)
.Where(x => x.ClientId == client.Id)
.Select(x => new WorkpieceTimeReportViewModel
{
WorkpieceName = x.WorkpieceName,

View File

@ -1,12 +0,0 @@
using Microsoft.AspNetCore.Mvc;
namespace FactoryRestApi.Controllers
{
public class StorekeeperController : Controller
{
public IActionResult Index()
{
return View();
}
}
}

View File

@ -1,13 +0,0 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
<Nullable>enable</Nullable>
<ImplicitUsings>enable</ImplicitUsings>
</PropertyGroup>
<ItemGroup>
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.5.0" />
</ItemGroup>
</Project>

View File

@ -1,25 +0,0 @@
var builder = WebApplication.CreateBuilder(args);
// Add services to the container.
builder.Services.AddControllers();
// Learn more about configuring Swagger/OpenAPI at https://aka.ms/aspnetcore/swashbuckle
builder.Services.AddEndpointsApiExplorer();
builder.Services.AddSwaggerGen();
var app = builder.Build();
// Configure the HTTP request pipeline.
if (app.Environment.IsDevelopment())
{
app.UseSwagger();
app.UseSwaggerUI();
}
app.UseHttpsRedirection();
app.UseAuthorization();
app.MapControllers();
app.Run();

View File

@ -1,31 +0,0 @@
{
"$schema": "https://json.schemastore.org/launchsettings.json",
"iisSettings": {
"windowsAuthentication": false,
"anonymousAuthentication": true,
"iisExpress": {
"applicationUrl": "http://localhost:65510",
"sslPort": 44345
}
},
"profiles": {
"FactoryRestApi": {
"commandName": "Project",
"dotnetRunMessages": true,
"launchBrowser": true,
"launchUrl": "swagger",
"applicationUrl": "https://localhost:7230;http://localhost:5003",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
},
"IIS Express": {
"commandName": "IISExpress",
"launchBrowser": true,
"launchUrl": "swagger",
"environmentVariables": {
"ASPNETCORE_ENVIRONMENT": "Development"
}
}
}
}

View File

@ -1,8 +0,0 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
}
}

View File

@ -1,9 +0,0 @@
{
"Logging": {
"LogLevel": {
"Default": "Information",
"Microsoft.AspNetCore": "Warning"
}
},
"AllowedHosts": "*"
}

View File

@ -377,10 +377,7 @@ namespace FactoryStorekeeperApp.Controllers
{
return Redirect("~/Home/Enter");
}
var planProductions = planProductionLogic.ReadList(new PlanProductionSearchModel
{
ClientId = Client.client.Id,
});
var planProductions = planProductionLogic.ReadList(null);
var machines = machineLogic.ReadList(new MachineSearchModel
{
ClientId = Client.client.Id,
@ -402,11 +399,7 @@ namespace FactoryStorekeeperApp.Controllers
Id = machine,
ClientId = Client.client.Id
});
var planProductions = planProductionLogic.ReadList(new PlanProductionSearchModel
{
ClientId = Client.client.Id,
}).Where(x => planproductions.Contains(x.Id))
.ToList();
var planProductions = planProductionLogic.ReadList(null).Where(x => planproductions.Contains(x.Id)).ToList();
if (existMachine != null && planProductions.Count > 0)
{
foreach (var planId in planproductions)

View File

@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<TargetFramework>net6.0</TargetFramework>
@ -12,7 +12,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FactoryBuisinessLogic\FactoryBuisinessLogic.csproj" />
<ProjectReference Include="..\FactoryBuisinessLogic\FactoryBusinessLogic.csproj" />
<ProjectReference Include="..\FactoryContracts\FactoryContracts.csproj" />
<ProjectReference Include="..\FactoryDatabaseImplement\FactoryDatabaseImplement.csproj" />
</ItemGroup>

View File

@ -4,11 +4,12 @@
}
@model MachineViewModel
<div class="text-center">
@if (Model == null)
@if (Model.MachineName.Equals(string.Empty))
{
<h2 class="display-4">Создание станка</h2>
}
@if (Model != null) {
else
{
<h2 class="display-4">Изменение станка</h2>
}

View File

@ -4,11 +4,11 @@
}
@model ProductViewModel;
<div class="text-center">
@if (Model == null)
@if (Model.ProductName.Equals(string.Empty))
{
<h2 class="display-4">Создание изделия</h2>
}
@if (Model != null)
else
{
<h2 class="display-4">Изменение изделия</h2>
}

View File

@ -5,7 +5,7 @@
<div class="text-center">
<h1 class="display-4">Выберите тип отчета</h1>
<div class="list-group">
<a class="nav-link text-dark" asp-controller="Home" asp-action="GetByProducts">Отчет планов производства по изделиям</a>
<a class="nav-link text-dark" asp-controller="Home" asp-action="GetByPeriod">Отчет по станкам за период</a>
<a asp-controller="Home" asp-action="GetByProducts">Отчет планов производства по изделиям</a>
<a asp-controller="Home" asp-action="GetByPeriod">Отчет по станкам за период</a>
</div>
</div>

View File

@ -5,11 +5,11 @@
@model RequirementViewModel
<div class="text-center">
@if (Model == null)
@if (Model.RequirementName.Equals(string.Empty))
{
<h2 class="display-4">Создание требования к изделию</h2>
}
@if (Model != null)
else
{
<h2 class="display-4">Изменение требования к изделию</h2>
}
@ -22,7 +22,12 @@
<option value="">Выберите изделие</option>
@foreach (var prod in ViewBag.Products)
{
<option value="@prod.Id">@prod.ProductName</option>
if (prod.Id == Model.ProductId) {
<option value="@prod.Id" selected="selected">@prod.ProductName</option>
}
else {
<option value="@prod.Id">@prod.ProductName</option>
}
}
</select>
</div>

View File

@ -15,7 +15,7 @@
</ItemGroup>
<ItemGroup>
<ProjectReference Include="..\FactoryBuisinessLogic\FactoryBuisinessLogic.csproj" />
<ProjectReference Include="..\FactoryBuisinessLogic\FactoryBusinessLogic.csproj" />
<ProjectReference Include="..\FactoryDatabaseImplement\FactoryDatabaseImplement.csproj" />
</ItemGroup>