Выходные для слабаков
This commit is contained in:
parent
49aa246bcf
commit
07826a9fe0
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HospitalContracts.BindingModels
|
||||
{
|
||||
public class ListProceduresBindingModel
|
||||
{
|
||||
public string FileName { get; set; } = string.Empty;
|
||||
public List<int> Recipes { get; set; } = new();
|
||||
}
|
||||
}
|
@ -0,0 +1,17 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using HospitalContracts.BindingModels;
|
||||
using HospitalContracts.ViewModels;
|
||||
|
||||
namespace HospitalContracts.BusinessLogicContracts
|
||||
{
|
||||
public interface IReportLogicDoctorcs
|
||||
{
|
||||
List<ListRecipesViewModel> GetProcedureRecipes(List<int> animals);
|
||||
void SaveServicesToWordFile(ListProceduresBindingModel model);
|
||||
void SaveServicesToExcelFile(ListProceduresBindingModel model);
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HospitalContracts.SearchModels
|
||||
{
|
||||
public class ListProcedureSearchModel
|
||||
{
|
||||
public List<int>? recipesIds { get; set; }
|
||||
}
|
||||
}
|
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace HospitalContracts.ViewModels
|
||||
{
|
||||
public class ListProcedureViewModel
|
||||
{
|
||||
public string ProcedureName { get; set; } = string.Empty;
|
||||
public List<ProcedureViewModel> Procedures { get; set; } = new();
|
||||
}
|
||||
}
|
@ -5,6 +5,7 @@ using HospitalDataModels.Models;
|
||||
using HospitalDoctorApp.Models;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using System.Diagnostics;
|
||||
using System.IO.Pipelines;
|
||||
|
||||
namespace HospitalDoctorApp.Controllers
|
||||
{
|
||||
@ -505,6 +506,17 @@ View(APIClient.GetRequest<List<DiseaseViewModel>>($"api/disease/getdiseases?dise
|
||||
return result;
|
||||
}
|
||||
[HttpGet]
|
||||
public IActionResult ServiceListReport()
|
||||
{
|
||||
ViewBag.Animals = APIClient.GetRequest<List<RecipeViewModel>>($"api/animal/getanimallist?adminid={APIClient.Doctor.Id}");
|
||||
return View();
|
||||
}
|
||||
[HttpGet]
|
||||
public IActionResult Report()
|
||||
{
|
||||
return View();
|
||||
}
|
||||
[HttpGet]
|
||||
public Tuple<RecipeViewModel, List<string>>? GetRecipe(int recipeId)
|
||||
{
|
||||
if (APIClient.Doctor == null)
|
||||
|
@ -0,0 +1,30 @@
|
||||
@using HospitalContracts.ViewModels;
|
||||
|
||||
@{
|
||||
|
||||
ViewData["Title"] = "ProcedureListReport";
|
||||
}
|
||||
|
||||
<div class="text-center">
|
||||
<h2 class="display-4">Создать списки процедур для рецептов</h2>
|
||||
</div>
|
||||
|
||||
<form method="post">
|
||||
|
||||
<div class="row">
|
||||
<div class="col-4">Рецепты:</div>
|
||||
<div class="col-8">
|
||||
<select name="recipes" class="form-control" multiple size="5" id="recipes">
|
||||
@foreach (var recipe in ViewBag.Recipes)
|
||||
{
|
||||
<option value="@recipe.Id">@recipe.RecipeName</option>
|
||||
}
|
||||
</select>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4"><input type="submit" value="Word" class="btn btn-primary" /></div>
|
||||
<div class="col-4"><input type="submit" value="Excel" class="btn btn-primary" /></div>
|
||||
</div>
|
||||
</form>
|
55
Hospital/HospitalDoctorApp/Views/Home/Report.cshtml
Normal file
55
Hospital/HospitalDoctorApp/Views/Home/Report.cshtml
Normal file
@ -0,0 +1,55 @@
|
||||
@{
|
||||
ViewData["Title"] = "Report";
|
||||
}
|
||||
<div class="text-center">
|
||||
<h1 class="display-4">Список пациентов с расшифровкой по лекарствам и болезням</h1>
|
||||
</div>
|
||||
<div class="text-center">
|
||||
@{
|
||||
|
||||
<div class="row mb-5">
|
||||
<div class="col-4">Начальная дата:</div>
|
||||
<div class="col-8">
|
||||
<input type="date" id="startDate" name="startDate" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<div class="row mb-5">
|
||||
<div class="col-4">Конечная дата:</div>
|
||||
<div class="col-8">
|
||||
<input type="date" id="endDate" name="endDate" class="form-control">
|
||||
</div>
|
||||
</div>
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
Номер
|
||||
</th>
|
||||
<th>
|
||||
Дата
|
||||
</th>
|
||||
<th>
|
||||
Пациент
|
||||
</th>
|
||||
<th>
|
||||
Лекарство
|
||||
</th>
|
||||
<th>
|
||||
Болезнь
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
будет заполняться вьюшками отчета
|
||||
</tbody>
|
||||
</table>
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4"><input type="submit" value="Создать отчет" class="btn btn-primary" /></div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-8"></div>
|
||||
<div class="col-4"><input type="submit" value="Отправить на почту" class="btn btn-primary" /></div>
|
||||
</div>
|
||||
}
|
||||
</div>
|
Loading…
Reference in New Issue
Block a user