Логика для репорт в контрактс

This commit is contained in:
Софья Якобчук 2024-05-26 09:07:15 +04:00
parent c351b43679
commit 43039c451d
10 changed files with 66 additions and 20 deletions

View File

@ -8,5 +8,10 @@ namespace LawCompanyContracts.BindingModels
{
internal class ReportExecutorBindingModel
{
public string FileName { get; set; } = string.Empty;
public DateTime? DateFrom { get; set; }
public DateTime? DateTo { get; set; }
public List<int>? Ids { get; set; }
public int ExecutorId { get; set; }
}
}

View File

@ -8,5 +8,11 @@ namespace LawCompanyContracts.BindingModels
{
internal class ReportGuarantorBindingModel
{
public string FileName { get; set; } = string.Empty;
public string HearingName { get; set; } = string.Empty;
public DateTime? DateFrom { get; set; }
public DateTime? DateTo { get; set; }
public List<int>? Ids { get; set; }
public int GuarantorId { get; set; }
}
}

View File

@ -3,10 +3,17 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LawCompanyContracts.BindingModels;
using LawCompanyContracts.ViewModels;
namespace LawCompanyContracts.BusinessLogicContracts
{
internal class IReportExecutorLogic
{
List<ReportClientCaseViewModel> GetClientCaseBooking(List<int> Ids);
List<ReportClientsViewModel> GetClients(ReportOrganiserBindingModel model);
void SaveClientCaseToWordFile(ReportOrganiserBindingModel model);
void SaveClientCaseToExcelFile(ReportOrganiserBindingModel model);
void SaveClientsToPdfFile(ReportOrganiserBindingModel model);
}
}

View File

@ -3,10 +3,17 @@ using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using LawCompanyContracts.BindingModels;
using LawCompanyContracts.ViewModels;
namespace LawCompanyContracts.BusinessLogicContracts
{
internal class IReportGuarantorLogic
{
List<ReportLawyerHearingViewModel> GetLawyerHearing(List<int> Ids);
List<ReportLawyersViewModel> GetLawyers(ReportGuarantorBindingModel model);
void SaveLawyerHearingToWordFile(ReportGuarantorBindingModel model);
void SaveLawyerHearingToExcelFile(ReportGuarantorBindingModel model);
void SaveLawyersToPdfFile(ReportGuarantorBindingModel model);
}
}

View File

@ -8,5 +8,9 @@ namespace LawCompanyContracts.ViewModels
{
internal class ReportClientCaseViewModel
{
public string ClientSurname { get; set; } = string.Empty;
public string ClientName { get; set; } = string.Empty;
public string ClientPatronymic { get; set; } = string.Empty;
public List<Tuple<string, DateTime>> CaseBookings { get; set; } = new();
}
}

View File

@ -8,5 +8,13 @@ namespace LawCompanyContracts.ViewModels
{
internal class ReportClientsViewModel
{
public int Id { get; set; }
public DateTime StartDate { get; set; }
public string ClientSurname { get; set; } = string.Empty;
public string ClientName { get; set; } = string.Empty;
public string ClientPatronymic { get; set; } = string.Empty;
public string CaseName { get; set; } = string.Empty;
public string HearingName { get; set; } = string.Empty;
public double HearingPrice { get; set; }
}
}

View File

@ -8,5 +8,7 @@ namespace LawCompanyContracts.ViewModels
{
internal class ReportLawyerHearingViewModel
{
public string LawyerName { get; set; } = string.Empty;
public List<Tuple<string, double>> Visits { get; set; } = new();
}
}

View File

@ -8,5 +8,12 @@ namespace LawCompanyContracts.ViewModels
{
internal class ReportLawyersViewModel
{
public int Id { get; set; }
public string HearingName { get; set; } = string.Empty;
public double HearingPrice { get; set; }
public string CaseName { get; set; } = string.Empty;
public DateTime? StartDate { get; set; }
public string LawyerName { get; set; } = string.Empty;
public double LawyerPrice { get; set; }
}
}

View File

@ -1807,7 +1807,7 @@ Expr = Sizzle.selectors = {
}
// numeric x and y parameters for Expr.filter.CHILD
// remember that false/true cast respectively to 0/1
// reClient that false/true cast respectively to 0/1
match[ 4 ] = +( match[ 4 ] ?
match[ 5 ] + ( match[ 6 ] || 1 ) :
2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) );
@ -2048,7 +2048,7 @@ Expr = Sizzle.selectors = {
// pseudo-class names are case-insensitive
// http://www.w3.org/TR/selectors/#pseudo-classes
// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
// Remember that setFilters inherits from pseudos
// ReClient that setFilters inherits from pseudos
var args,
fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
Sizzle.error( "unsupported pseudo: " + pseudo );
@ -3107,7 +3107,7 @@ jQuery.fn.extend( {
return !!winnow(
this,
// If this is a positional/relative selector, check membership in the returned set
// If this is a positional/relative selector, check Clientship in the returned set
// so $("p:first").is("p:last") won't return true for a doc with two "p".
typeof selector === "string" && rneedsContext.test( selector ) ?
jQuery( selector ) :
@ -4094,7 +4094,7 @@ jQuery.extend( {
return;
}
// Remember that the DOM is ready
// ReClient that the DOM is ready
jQuery.isReady = true;
// If a normal DOM Ready event fired, decrement, and wait if need be
@ -4858,7 +4858,7 @@ function showHide( elements, show ) {
if ( display !== "none" ) {
values[ index ] = "none";
// Remember what we're overwriting
// ReClient what we're overwriting
dataPriv.set( elem, "display", display );
}
}
@ -5041,7 +5041,7 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
// push.apply(_, arraylike) throws on ancient WebKit
jQuery.merge( nodes, tmp.childNodes );
// Remember the top-level container
// ReClient the top-level container
tmp = fragment.firstChild;
// Ensure the created nodes are orphaned (#12392)
@ -6425,7 +6425,7 @@ var swap = function( elem, options, callback ) {
var ret, name,
old = {};
// Remember the old values, and insert the new ones
// ReClient the old values, and insert the new ones
for ( name in options ) {
old[ name ] = elem.style[ name ];
elem.style[ name ] = options[ name ];
@ -6596,7 +6596,7 @@ function curCSS( elem, name, computed ) {
// https://drafts.csswg.org/cssom/#resolved-values
if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {
// Remember the original values
// ReClient the original values
width = style.width;
minWidth = style.minWidth;
maxWidth = style.maxWidth;
@ -9579,7 +9579,7 @@ jQuery.extend( {
// More options handling for requests with no content
if ( !s.hasContent ) {
// Remember the hash so we can put it back
// ReClient the hash so we can put it back
uncached = s.url.slice( cacheURL.length );
// If data is available and should be processed, append data to url
@ -10214,7 +10214,7 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
// Handle iff the expected data type is "jsonp" or we have a parameter to set
if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
// Get callback name, remembering preexisting value associated with it
// Get callback name, reClienting preexisting value associated with it
callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?
s.jsonpCallback() :
s.jsonpCallback;

View File

@ -1807,7 +1807,7 @@ Expr = Sizzle.selectors = {
}
// numeric x and y parameters for Expr.filter.CHILD
// remember that false/true cast respectively to 0/1
// reClient that false/true cast respectively to 0/1
match[ 4 ] = +( match[ 4 ] ?
match[ 5 ] + ( match[ 6 ] || 1 ) :
2 * ( match[ 3 ] === "even" || match[ 3 ] === "odd" ) );
@ -2048,7 +2048,7 @@ Expr = Sizzle.selectors = {
// pseudo-class names are case-insensitive
// http://www.w3.org/TR/selectors/#pseudo-classes
// Prioritize by case sensitivity in case custom pseudos are added with uppercase letters
// Remember that setFilters inherits from pseudos
// ReClient that setFilters inherits from pseudos
var args,
fn = Expr.pseudos[ pseudo ] || Expr.setFilters[ pseudo.toLowerCase() ] ||
Sizzle.error( "unsupported pseudo: " + pseudo );
@ -3107,7 +3107,7 @@ jQuery.fn.extend( {
return !!winnow(
this,
// If this is a positional/relative selector, check membership in the returned set
// If this is a positional/relative selector, check Clientship in the returned set
// so $("p:first").is("p:last") won't return true for a doc with two "p".
typeof selector === "string" && rneedsContext.test( selector ) ?
jQuery( selector ) :
@ -4094,7 +4094,7 @@ jQuery.extend( {
return;
}
// Remember that the DOM is ready
// ReClient that the DOM is ready
jQuery.isReady = true;
// If a normal DOM Ready event fired, decrement, and wait if need be
@ -4858,7 +4858,7 @@ function showHide( elements, show ) {
if ( display !== "none" ) {
values[ index ] = "none";
// Remember what we're overwriting
// ReClient what we're overwriting
dataPriv.set( elem, "display", display );
}
}
@ -5041,7 +5041,7 @@ function buildFragment( elems, context, scripts, selection, ignored ) {
// push.apply(_, arraylike) throws on ancient WebKit
jQuery.merge( nodes, tmp.childNodes );
// Remember the top-level container
// ReClient the top-level container
tmp = fragment.firstChild;
// Ensure the created nodes are orphaned (#12392)
@ -6425,7 +6425,7 @@ var swap = function( elem, options, callback ) {
var ret, name,
old = {};
// Remember the old values, and insert the new ones
// ReClient the old values, and insert the new ones
for ( name in options ) {
old[ name ] = elem.style[ name ];
elem.style[ name ] = options[ name ];
@ -6596,7 +6596,7 @@ function curCSS( elem, name, computed ) {
// https://drafts.csswg.org/cssom/#resolved-values
if ( !support.pixelBoxStyles() && rnumnonpx.test( ret ) && rboxStyle.test( name ) ) {
// Remember the original values
// ReClient the original values
width = style.width;
minWidth = style.minWidth;
maxWidth = style.maxWidth;
@ -9579,7 +9579,7 @@ jQuery.extend( {
// More options handling for requests with no content
if ( !s.hasContent ) {
// Remember the hash so we can put it back
// ReClient the hash so we can put it back
uncached = s.url.slice( cacheURL.length );
// If data is available and should be processed, append data to url
@ -10214,7 +10214,7 @@ jQuery.ajaxPrefilter( "json jsonp", function( s, originalSettings, jqXHR ) {
// Handle iff the expected data type is "jsonp" or we have a parameter to set
if ( jsonProp || s.dataTypes[ 0 ] === "jsonp" ) {
// Get callback name, remembering preexisting value associated with it
// Get callback name, reClienting preexisting value associated with it
callbackName = s.jsonpCallback = isFunction( s.jsonpCallback ) ?
s.jsonpCallback() :
s.jsonpCallback;