51 lines
1.2 KiB
C#
51 lines
1.2 KiB
C#
using BeWo.Data.Access;
|
|
using BeWo.Service.ServiceContracts;
|
|
using BS.Shared.Core;
|
|
using BS.Shared.DataContracts.AdminService;
|
|
using DevExpress.Pdf.Native.BouncyCastle.Ocsp;
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using System.ServiceModel;
|
|
using System.Text;
|
|
using System.Threading.Tasks;
|
|
|
|
namespace BeWo.Service.ServiceImplementations
|
|
{
|
|
[ServiceBehavior(InstanceContextMode = InstanceContextMode.PerCall, ConcurrencyMode = ConcurrencyMode.Single)]
|
|
public class AdminServiceImp : IAdminService
|
|
{
|
|
public string Test()
|
|
{
|
|
return "Test erfolgreich!";
|
|
}
|
|
|
|
public string Echo(string echo)
|
|
{
|
|
return echo;
|
|
}
|
|
|
|
public object GetGkvAbrechnungSumme(AdminServiceSumReqDC request)
|
|
{
|
|
if (request == null)
|
|
{
|
|
throw new ArgumentException("request darf nicht null sein");
|
|
}
|
|
|
|
if(!Utils.TryParseISO8601(request.Start, out var start))
|
|
{
|
|
throw new ArgumentException("start entspricht nicht ISO8601 Norm.");
|
|
}
|
|
|
|
if (!Utils.TryParseISO8601(request.End, out var end))
|
|
{
|
|
throw new ArgumentException("end entspricht nicht ISO8601 Norm.");
|
|
}
|
|
|
|
var sum = DAOFactory.ScriptDAO.GetGkvSumByDateRange(start, end);
|
|
|
|
return sum?.ToString("0.00");
|
|
}
|
|
}
|
|
}
|