BeWoPlanerMobil:

Fortschritt bei Quittierungsbelegunterschrift

Qlik:
    Zeitraum hinzugefügt
This commit is contained in:
Lyndon Jetten
2020-09-23 16:00:51 +02:00
parent 14b04d1685
commit 0cb5c02831
23 changed files with 465 additions and 53 deletions

View File

@@ -1535,6 +1535,8 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.DienstDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.DienstDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.RatingTypeDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.ConfirmationReceiptSignatureDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.BargeldkassenDC>))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.BargeldkassenDC))]
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(System.Collections.Generic.List<BS.Shared.DataContracts.BargeldtransaktionDC>))]
@@ -4787,6 +4789,40 @@ namespace BeWo.ServiceProxy
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/FetchServiceRecordRatingsBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List<BS.Shared.DataContracts.GoalRatingDC> FetchServiceRecordRatings(System.Nullable<long> supportConceptOid, System.Nullable<long> costBearer2SupportConceptOid, System.Nullable<long> supportConceptApprovalPeriodOid, System.Nullable<long> serviceCategoryOid, System.Nullable<System.DateTime> start, System.Nullable<System.DateTime> end);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/InsertConfirmationReceiptSignature", ReplyAction="http://tempuri.org/IOperationsService/InsertConfirmationReceiptSignatureResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/InsertConfirmationReceiptSignatureBeWoFault" +
"Fault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
void InsertConfirmationReceiptSignature(BS.Shared.DataContracts.ConfirmationReceiptSignatureDC confirmationReceiptSignature);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/InsertConfirmationReceiptSignatures", ReplyAction="http://tempuri.org/IOperationsService/InsertConfirmationReceiptSignaturesResponse" +
"")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/InsertConfirmationReceiptSignaturesBeWoFaul" +
"tFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
void InsertConfirmationReceiptSignatures(System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC> confirmationReceiptSignatures);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/DeleteConfirmationReceiptSignature", ReplyAction="http://tempuri.org/IOperationsService/DeleteConfirmationReceiptSignatureResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/DeleteConfirmationReceiptSignatureBeWoFault" +
"Fault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
void DeleteConfirmationReceiptSignature(long confirmationReceiptSignatureOid);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateConfirmationReceiptSignature", ReplyAction="http://tempuri.org/IOperationsService/UpdateConfirmationReceiptSignatureResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateConfirmationReceiptSignatureBeWoFault" +
"Fault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
BS.Shared.DataContracts.ConfirmationReceiptSignatureDC UpdateConfirmationReceiptSignature(BS.Shared.DataContracts.ConfirmationReceiptSignatureDC confirmationReceiptSignature);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetConfirmationReceiptSignaturesByEmployee", ReplyAction="http://tempuri.org/IOperationsService/GetConfirmationReceiptSignaturesByEmployeeR" +
"esponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetConfirmationReceiptSignaturesByEmployeeB" +
"eWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC> GetConfirmationReceiptSignaturesByEmployee(long employeeOid, BS.Shared.Core.DateTimeSpan timeSpan);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/GetConfirmationReceiptSignaturesByServiceRe" +
"cord", ReplyAction="http://tempuri.org/IOperationsService/GetConfirmationReceiptSignaturesByServiceRe" +
"cordResponse")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/GetConfirmationReceiptSignaturesByServiceRe" +
"cordBeWoFaultFault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC> GetConfirmationReceiptSignaturesByServiceRecord(long serviceRecordOid);
[System.ServiceModel.OperationContractAttribute(Action="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDC", ReplyAction="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDCResponse" +
"")]
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/UpdateIsChatActiveCustomerAPPCodeDCBeWoFaul" +
@@ -5807,6 +5843,36 @@ namespace BeWo.ServiceProxy
return base.Channel.FetchServiceRecordRatings(supportConceptOid, costBearer2SupportConceptOid, supportConceptApprovalPeriodOid, serviceCategoryOid, start, end);
}
public void InsertConfirmationReceiptSignature(BS.Shared.DataContracts.ConfirmationReceiptSignatureDC confirmationReceiptSignature)
{
base.Channel.InsertConfirmationReceiptSignature(confirmationReceiptSignature);
}
public void InsertConfirmationReceiptSignatures(System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC> confirmationReceiptSignatures)
{
base.Channel.InsertConfirmationReceiptSignatures(confirmationReceiptSignatures);
}
public void DeleteConfirmationReceiptSignature(long confirmationReceiptSignatureOid)
{
base.Channel.DeleteConfirmationReceiptSignature(confirmationReceiptSignatureOid);
}
public BS.Shared.DataContracts.ConfirmationReceiptSignatureDC UpdateConfirmationReceiptSignature(BS.Shared.DataContracts.ConfirmationReceiptSignatureDC confirmationReceiptSignature)
{
return base.Channel.UpdateConfirmationReceiptSignature(confirmationReceiptSignature);
}
public System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC> GetConfirmationReceiptSignaturesByEmployee(long employeeOid, BS.Shared.Core.DateTimeSpan timeSpan)
{
return base.Channel.GetConfirmationReceiptSignaturesByEmployee(employeeOid, timeSpan);
}
public System.Collections.Generic.List<BS.Shared.DataContracts.ConfirmationReceiptSignatureDC> GetConfirmationReceiptSignaturesByServiceRecord(long serviceRecordOid)
{
return base.Channel.GetConfirmationReceiptSignaturesByServiceRecord(serviceRecordOid);
}
public void UpdateIsChatActiveCustomerAPPCodeDC(long customerOid, int activeType)
{
base.Channel.UpdateIsChatActiveCustomerAPPCodeDC(customerOid, activeType);

View File

@@ -5,6 +5,7 @@ using BeWo.Report.ReportObjects;
using BeWoPlanerMobil.Models;
using BeWoPlanerMobil.Service;
using BeWoPlanerMobil.Util;
using BS.Shared.Core;
using BS.Shared.Extensions;
namespace BeWoPlanerMobil.Controllers
@@ -59,6 +60,8 @@ namespace BeWoPlanerMobil.Controllers
Model.Customers = customers;
var test = OperationsService.GetConfirmationReceiptSignaturesByEmployee(1, new DateTimeSpan(new DateTime(2020, 1, 1), new DateTime(2020, 2, 1)));
return View(Model);
}
@@ -84,6 +87,8 @@ namespace BeWoPlanerMobil.Controllers
return Report();
}
Model.QuittierungsbelegItems.Clear();
var selectedCustomer = Model.Customers.FirstOrDefault(customer => customer.CustomerOid == customerOid);
Model.SelectedCustomer = selectedCustomer;
@@ -117,5 +122,14 @@ namespace BeWoPlanerMobil.Controllers
return _LeerzeichenFuerGetMethoden;
}
[Authorize]
[HttpPost]
public ActionResult CreateEmployeeSignatureForServiceOverview(FormCollection formCollection)
{
return RedirectToActionPermanent("Report");
}
}
}

View File

@@ -34,6 +34,6 @@ namespace BeWoPlanerMobil.Models
public static string TimeOfLastAction { get; set; }
public static bool HasRightToInsertRessourceAppointments => MobileSessionFacade.CheckForUserRight(UserRightType.KalenderRessourcentermineAnlegen) || MobileSessionFacade.CheckForUserRight(UserRightType.CreateAll);
public static bool IsAllowedToSeeBills => false;//MobileSessionFacade.CheckForUserRight(UserRightType.Analysis_ServiceOverview_View);
public static bool IsAllowedToSeeBills => false;// MobileSessionFacade.CheckForUserRight(UserRightType.Analysis_ServiceOverview_View);
}
}

View File

@@ -43,7 +43,11 @@ namespace BeWoPlanerMobil.Models
for(var i = 1; i < 13; i++)
{
result.Add(new SelectListItem {Value = i.ToString(), Text = i.ToString()});
result.Add(new SelectListItem
{
Value = i.ToString(),
Text = new DateTime(DateTime.Now.Year, i, 1).ToString("MMMM")
});
}
return result;
@@ -58,7 +62,11 @@ namespace BeWoPlanerMobil.Models
for(var i = DateTime.Today.Year + 1; i > DateTime.Today.Year - 11; i--)
{
result.Add(new SelectListItem {Value = i.ToString(), Text = i.ToString()});
result.Add(new SelectListItem
{
Value = i.ToString(),
Text = i.ToString()
});
}
return result;

View File

@@ -215,4 +215,18 @@ function hideSignature() {
var url = getResetSignatureImageUrl();
$.get(url);
}
function resizeCanvas() {
if($("#sketch-pad").length !== 0) {
var rowWidth = $("#canvas-row").innerWidth();
var canvasWidth = $("#sketch-pad").innerWidth();
var newWidth = rowWidth;
if(newWidth !== canvasWidth) {
$("#sketch-pad").prop("width", newWidth);
new Signature();
}
}
}

View File

@@ -2,9 +2,28 @@
$("#report-form-container").hide();
$("#report-signature-container").addClass("d-block");
var customer = $("#customers-drop-down option:selected").text();
var month = $("#month-select option:selected").text();
var year = $("#year-select option:selected").text();
$("#report-info-column").html("Unterschrift für erbrachte Leistungen von " + customer + " im " + month + " " + year);
resizeCanvas();
}
function saveReportSignature() {
// TODO: Meldung anzeigen
}
function confirmReportSignatureCancellation() {
showMessagePopupWithCallback("Unterschrift", "Sind Sie sicher, dass Sie die Unterschrift nicht speichern möchten?",
function() {
$("#report-signature-container").removeClass("d-block");
$("#report-form-container").show();
var canvas = document.getElementById("sketch-pad");
var context = canvas.getContext("2d");
context.clearRect(0, 0, canvas.width, canvas.height);
}, false);
}

View File

@@ -141,20 +141,6 @@
resizeCanvas();
});
function resizeCanvas() {
if($("#sketch-pad").length !== 0) {
var rowWidth = $("#canvas-row").innerWidth();
var canvasWidth = $("#sketch-pad").innerWidth();
var newWidth = rowWidth;
if (newWidth !== canvasWidth) {
$("#sketch-pad").prop("width", newWidth);
new Signature();
}
}
}
function getSetServiceRecordEmployeeUrl() {
return "@Url.Action("SetServiceRecordEmployee")";
}

View File

@@ -14,7 +14,7 @@ Info:
-->
<div class="container-fluid" id="report-form-container">
<div class="container-fluid my-3" id="report-form-container">
<div class="row">
<div class="col col-12 col-md-6 col-lg-5">
@using(Html.BeginForm("CreateServiceOverview", "Report", FormMethod.Post))
@@ -35,13 +35,13 @@ Info:
<div class="col-md">
<div class="form-group mb-1">
@Html.LabelFor(m => m.SelectedMonth)
@Html.DropDownListFor(m => m.SelectedMonth, Model.Months, new { @class = "form-control" })
@Html.DropDownListFor(m => m.SelectedMonth, Model.Months, new { @class = "form-control", id = "month-select" })
</div>
</div>
<div class="col-md">
<div class="form-group mb-1">
@Html.LabelFor(m => m.SelectedYear)
@Html.DropDownListFor(m => m.SelectedYear, Model.Years, new { @class = "form-control" })
@Html.DropDownListFor(m => m.SelectedYear, Model.Years, new { @class = "form-control", id = "year-select" })
</div>
</div>
</div>
@@ -119,7 +119,7 @@ Info:
<!-- Abstandshalter -->
</div>
<div class="ml-3 bd-highlight">
<button type="button" class="btn btn-primary" id="signature-button">Unterschreiben</button>
<button type="button" class="btn btn-primary" id="signature-button" onclick="prepareReportSignature()">Unterschreiben</button>
</div>
</div>
}
@@ -129,19 +129,19 @@ Info:
</div>
</div>
<div class="container-fluid d-none mb-3" id="report-signature-container">
<div class="container-fluid d-none my-3" id="report-signature-container">
<div class="container-fluid">
<div class="row">
<div class="col">
<h4 class="d-inline">Unterschrift</h4>
<button type="button" class="btn btn-primary float-right" onclick="prepareReportSignature()">
<h4 class="d-inline" id="report-info-column">Unterschrift</h4>
<button type="button" class="btn btn-primary float-right" onclick="confirmReportSignatureCancellation()">
<span class="fas fa-times-circle"></span>
</button>
</div>
</div>
<div class="row mt-3" id="report-canvas-row">
<div class="canvas-container" id="report-canvas-container">
<canvas id="report-sketch-pad" width="500" heigh="200" style="border: 1px solid #343A40" class="bg-white rounded"></canvas>
<div class="row mt-3" id="canvas-row">
<div class="canvas-container" id="canvas-container">
<canvas id="sketch-pad" width="500" heigh="200" style="border: 1px solid #343A40" class="bg-white rounded"></canvas>
</div>
</div>
<div class="row">

View File

@@ -3290,13 +3290,6 @@ namespace BeWo.Data.Access
{
var c = CreateCriteria<Resource>("r").Add(Restrictions.Eq(nameof(BeWoEntityBase.IsActive), ActivationTypeId.Active));
/*
* var detachedCriteria1 = DetachedCriteria.For<Employee2SchedulerAppointment>()
.Add(Restrictions.In(Employee2SchedulerAppointment.PropertyName_Employee + ".Oid", pSelectedEmployees))
.SetProjection(Projections.Property(Employee2SchedulerAppointment.PropertyName_SchedulerAppointment));
var employee2SchedCrit = Subqueries.PropertyIn(BeWoEntityBase.PropertyName_Oid, detachedCriteria1);
*/
var sql = $"Oid NOT IN (SELECT Oid FROM resource WHERE isactive = 1 AND Oid NOT IN (SELECT resourceoid FROM resource2newschapp r2n WHERE r2n.newschappoid NOT IN (SELECT oid FROM newschedulerappointment WHERE startdate > '{start:yyyy-MM-dd HH:mm:ss}' OR enddate < '{end:yyyy-MM-dd HH:mm:ss}')))";
var criterion = Expression.Sql(sql);
@@ -3438,5 +3431,33 @@ namespace BeWo.Data.Access
return result;
}
public IList<ConfirmationReceiptSignature> GetConfirmationReceiptSignaturesByEmployee(long employeeOid, DateTimeSpan timeSpan)
{
/*
* var detachedCriteria1 = DetachedCriteria.For<Employee2SchedulerAppointment>()
.Add(Restrictions.In(Employee2SchedulerAppointment.PropertyName_Employee + ".Oid", pSelectedEmployees))
.SetProjection(Projections.Property(Employee2SchedulerAppointment.PropertyName_SchedulerAppointment));
var employee2SchedCrit = Subqueries.PropertyIn(BeWoEntityBase.PropertyName_Oid, detachedCriteria1);
*/
var between = CreateBetweenDateTimesCriterion(timeSpan.StartDateTime, timeSpan.EndDateTime, nameof(ServiceRecord.Start), nameof(ServiceRecord.End));
var criteria = CreateCriteriaIsActive<ConfirmationReceiptSignature>()
.Add(Restrictions.Eq(nameof(ConfirmationReceiptSignature.EmployeeOid), employeeOid))
.CreateCriteria(nameof(ConfirmationReceiptSignature.ServiceRecords), JoinType.InnerJoin).Add(between);
var mySql = ToSql(criteria);
return criteria.List<ConfirmationReceiptSignature>();
}
public List<ConfirmationReceiptSignature> GetConfirmationReceiptSignaturesByServiceRecord(long serviceRecordOid)
{
var detachedCriteria = DetachedCriteria.For<ServiceRecord>()
.Add(Subqueries.PropertyIn(nameof(ServiceRecord.Oid), DetachedCriteria.For<ServiceRecord>().SetProjection(Projections.Property(nameof(ServiceRecord.Oid)))));
return null;
}
}
}

View File

@@ -134,6 +134,7 @@
<Compile Include="ASPHibernateSessionManager.cs" />
<Compile Include="DefaultHibernateSessionManager.cs" />
<Compile Include="Entities\AddressHistory.cs" />
<Compile Include="Entities\ConfirmationReceiptSignature.cs" />
<Compile Include="Entities\GoalRating.cs" />
<Compile Include="Entities\Rating.cs" />
<Compile Include="Entities\RatingType.cs" />
@@ -606,6 +607,7 @@
<EmbeddedResource Include="Mappings\Dienst.hbm.xml">
<SubType>Designer</SubType>
</EmbeddedResource>
<Content Include="Mappings\ConfirmationReceiptSignature.hbm.xml" />
<Content Include="Mappings\DeletionHistory.hbm.xml" />
<EmbeddedResource Include="Mappings\FlexibleReportLayout.hbm.xml">
<SubType>Designer</SubType>

View File

@@ -0,0 +1,52 @@
using System.Collections.Generic;
namespace BeWo.Data.Entities
{
public class ConfirmationReceiptSignature : BeWoEntityBase
{
private long? _EmployeeOid;
private IList<ServiceRecord> _ServiceRecords;
private string _SignatureImage;
public virtual long? EmployeeOid
{
get => _EmployeeOid;
set
{
if(AreDifferent(_EmployeeOid, value))
{
_EmployeeOid = value;
}
}
}
public virtual IList<ServiceRecord> ServiceRecords
{
get => _ServiceRecords;
set
{
if(AreDifferent(_ServiceRecords, value))
{
_ServiceRecords = value;
}
}
}
public virtual string SignatureImage
{
get => _SignatureImage;
set
{
if(AreDifferent(_SignatureImage, value))
{
_SignatureImage = value;
}
}
}
}
}

View File

@@ -0,0 +1,25 @@
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2">
<class name="BeWo.Data.Entities.ConfirmationReceiptSignature, BeWo.Data" table="ConfirmationReceiptSignature">
<id name="Oid" column ="Oid" unsaved-value="null">
<generator class="identity" />
</id>
<version type="Int64" column="Version" name="Version" />
<property name="ServiceRecordOid" column="ServiceRecordOid" />
<property name="InsTs" />
<property name="InsUser" />
<property column="Tid" type="BS.Shared.TableID, BS.Shared" name="_Tid" access="field" />
<property name="UdpUser" />
<property name="IsActive" type="BS.Shared.ActivationTypeId, BS.Shared" />
<property name="SystemEntryID" type="BS.Shared.SystemEntryID, BS.Shared" />
<property name="Notice" />
<property name="SignatureImage" column="SignatureImage" />
<property name="EmployeeOid" />
<bag name="ServiceRecords" table="ConfirmationSignature2ServiceRecord" generic="true" cascade="none" batch-size="250">
<key column="ConfirmationSignatureOid" />
<many-to-many column="ServiceRecordOid" class="BeWo.Data.Entities.ServiceRecord, BeWo.Data" />
</bag>
</class>
</hibernate-mapping>

View File

@@ -0,0 +1,25 @@
CREATE TABLE `confirmationreceiptsignature` (
`Oid` bigint(19) NOT NULL AUTO_INCREMENT,
`Tid` int(10) DEFAULT NULL,
`Notice` varchar(1024) DEFAULT NULL,
`InsTs` datetime DEFAULT NULL,
`InsUser` varchar(256) DEFAULT NULL,
`Version` bigint(19) DEFAULT NULL,
`UdpUser` varchar(256) DEFAULT NULL,
`IsActive` tinyint(4) DEFAULT NULL,
`SystemEntryID` int(10) DEFAULT NULL,
`SignatureImage` longtext,
`EmployeeOid` bigint(19) DEFAULT NULL,
PRIMARY KEY (`Oid`),
KEY `CONFIRMATIONRECEIPTSIGNATURE_EMPLOYEE_FK` (`EmployeeOid`),
CONSTRAINT `FK_CONFIRMATIONRECEIPTSIGNATURE2EMPLOYEE` FOREIGN KEY (`EmployeeOid`) REFERENCES `Employee` (`Oid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;
CREATE TABLE `confirmationsignature2servicerecord` (
`ConfirmationSignatureOid` bigint(19) DEFAULT NULL,
`ServiceRecordOid` bigint(19) DEFAULT NULL,
KEY `CONFSIG2SERVREC_CONFSIG_FK` (`ConfirmationSignatureOid`),
CONSTRAINT `FK_CONFSIG2SERVREC_CONFSIG` FOREIGN KEY (`ConfirmationSignatureOid`) REFERENCES `confirmationreceiptsignature` (`Oid`),
KEY `CONFSIG2SERVREC_SERVREC_FK` (`ServiceRecordOid`),
CONSTRAINT `FK_CONFSIG2SERVREC_SERVREC` FOREIGN KEY (`ServiceRecordOid`) REFERENCES `servicerecord` (`Oid`)
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

View File

@@ -136,7 +136,9 @@ namespace demo_reports.Export
MitarbeiterId = absenceTime.EmployeeOid,
Beginn = $"{absenceTime.Start:yyyy-MM-dd}",
Ende = $"{absenceTime.End:yyyy-MM-dd}",
Abwesenheitskategorie = absenceTime.AbsenceReason.Description
Abwesenheitskategorie = absenceTime.AbsenceReason.Description,
ZeitraumVon = $"{dateTimeSpan.StartDate:yyyy-MM-dd}",
ZeitraumBis = $"{dateTimeSpan.EndDate:yyyy-MM-dd}"
});
}
});
@@ -218,7 +220,9 @@ namespace demo_reports.Export
FLSSoll = flsSoll,
GesamtIst = gesamtIst,
StundenSoll = stundenSoll,
IstFachkraft = employee.IsQualified ?? false
IstFachkraft = employee.IsQualified ?? false,
ZeitraumVon = $"{dateTimeSpan.StartDate:yyyy-MM-dd}",
ZeitraumBis = $"{dateTimeSpan.EndDate:yyyy-MM-dd}"
});
}
catch(Exception exception)
@@ -228,16 +232,7 @@ namespace demo_reports.Export
}
});
var stringWriter = new StringWriter();
using(var csv = new CsvWriter(stringWriter, CreateCsvConfig()))
{
csv.WriteRecords(resultList);
}
return stringWriter.ToString();
return CreateCsvString(resultList);
}
private static string GetCustomerCSV()
@@ -279,7 +274,9 @@ namespace demo_reports.Export
GerundeteGruppendauer = serviceRecord.GroupRoundedDuration,
GruppenId = serviceRecord.GroupOid,
Kategorie = serviceRecord.ServiceDescription.Name,
KostentraegerZuHilfeplanId = serviceRecord.CostBearer2SupportConceptOid
KostentraegerZuHilfeplanId = serviceRecord.CostBearer2SupportConceptOid,
ZeitraumVon = $"{dateTimeSpan.StartDate:yyyy-MM-dd}",
ZeitraumBis = $"{dateTimeSpan.EndDate:yyyy-MM-dd}"
});
});
@@ -348,8 +345,7 @@ namespace demo_reports.Export
private static CsvConfiguration CreateCsvConfig()
{
var config = new CsvConfiguration(CultureInfo.GetCultureInfo("de-DE"));
config.Delimiter = ";";
var config = new CsvConfiguration(CultureInfo.GetCultureInfo("de-DE")) {Delimiter = ";"};
return config;
}

View File

@@ -0,0 +1,34 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using BeWo.Data.Entities;
using BS.Shared.DataContracts;
namespace BeWo.Service.DCEntityMapper
{
public class ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature : AbstractIDCEntityMapper<ConfirmationReceiptSignature, ConfirmationReceiptSignatureDC>
{
public override ConfirmationReceiptSignatureDC MergeWithDC(ConfirmationReceiptSignature pEntity, ConfirmationReceiptSignatureDC pDataContract)
{
pDataContract.SignatureImage = pEntity.SignatureImage;
pDataContract.EmployeeOid = pEntity.EmployeeOid;
pDataContract.ServiceRecords = MapperFactory.ServiceRecordDC_ServiceRecord.MapToNewDCs(pEntity.ServiceRecords);
return pDataContract;
}
public override ConfirmationReceiptSignature MergeWithEntity(ConfirmationReceiptSignatureDC pDataContract, ConfirmationReceiptSignature pEntity)
{
throw new NotImplementedException();
}
protected override bool AreDCAndEntityEqual(ConfirmationReceiptSignatureDC pDC, ConfirmationReceiptSignature pEntity)
{
throw new NotImplementedException();
}
}
}

View File

@@ -268,6 +268,8 @@ namespace BeWo.Service.DCEntityMapper
private static GoalRatingDC_GoalRating _GoalRatingDC_GoalRating;
private static ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature _ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature;
public static MedRecordDC_MedRecord MedRecordDC_MedRecord =>
_MedRecordDC_MedRecord ?? (_MedRecordDC_MedRecord = new MedRecordDC_MedRecord());
@@ -673,5 +675,8 @@ namespace BeWo.Service.DCEntityMapper
public static RatingTypeDC_RatingType RatingTypeDC_RatingType =>
_RatingTypeDC_RatingType ?? (_RatingTypeDC_RatingType = new RatingTypeDC_RatingType());
public static ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature =>
_ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature ?? (_ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature = new ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature());
}
}

View File

@@ -19,7 +19,7 @@ namespace BeWo.Service.Plugins
#if DEBUG
var t = "demo";
t = "irgendwaswasesnichtgibt";
//t = "irgendwaswasesnichtgibt";
//t = "5473568546"; //Interner Chat
//t = "2356097460"; // Lebenshilfe Würzburg
//t = "1234567890"; // Präsentationsdatenbank

View File

@@ -166,6 +166,7 @@
<Compile Include="Core\ServiceLogic.cs" />
<Compile Include="Core\SettingsLogic.cs" />
<Compile Include="Core\Utils.cs" />
<Compile Include="DCEntityMapper\ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature.cs" />
<Compile Include="DCEntityMapper\DienstDC_Dienst.cs" />
<Compile Include="DCEntityMapper\RatingTypeDC_RatingType.cs" />
<Compile Include="DCEntityMapper\GoalRatingDC_GoalRating.cs" />

View File

@@ -907,5 +907,29 @@ namespace BeWo.Service.ServiceContracts
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<GoalRatingDC> FetchServiceRecordRatings(long? supportConceptOid, long? costBearer2SupportConceptOid, long? supportConceptApprovalPeriodOid, long? serviceCategoryOid, DateTime? start, DateTime? end);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
void InsertConfirmationReceiptSignature(ConfirmationReceiptSignatureDC confirmationReceiptSignature);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
void InsertConfirmationReceiptSignatures(List<ConfirmationReceiptSignatureDC> confirmationReceiptSignatures);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
void DeleteConfirmationReceiptSignature(long confirmationReceiptSignatureOid);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
ConfirmationReceiptSignatureDC UpdateConfirmationReceiptSignature(ConfirmationReceiptSignatureDC confirmationReceiptSignature);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<ConfirmationReceiptSignatureDC> GetConfirmationReceiptSignaturesByEmployee(long employeeOid, DateTimeSpan timeSpan);
[FaultContract(typeof(BeWoFault))]
[OperationContract]
List<ConfirmationReceiptSignatureDC> GetConfirmationReceiptSignaturesByServiceRecord(long serviceRecordOid);
}
}

View File

@@ -5994,5 +5994,99 @@ namespace BeWo.Service.ServiceImplementations
throw Utils.CreateBeWoFaultException(e);
}
}
public void InsertConfirmationReceiptSignature(ConfirmationReceiptSignatureDC confirmationReceiptSignature)
{
try
{
var confRecSig = MapperFactory.ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature.MapToNewEntity(confirmationReceiptSignature);
DAOFactory.GenericDAO.Insert(confRecSig);
}
catch(Exception exception)
{
throw Utils.CreateBeWoFaultException(exception);
}
}
public void InsertConfirmationReceiptSignatures(List<ConfirmationReceiptSignatureDC> confirmationReceiptSignatures)
{
try
{
var confRecSigs = MapperFactory.ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature.MapToNewEntities(confirmationReceiptSignatures);
DAOFactory.GenericDAO.Insert(confRecSigs);
}
catch(Exception exception)
{
throw Utils.CreateBeWoFaultException(exception);
}
}
public void DeleteConfirmationReceiptSignature(long confirmationReceiptSignatureOid)
{
try
{
var confirmationReceiptSignatureToDelete = DAOFactory.GenericDAO.LoadByID<ConfirmationReceiptSignature>(confirmationReceiptSignatureOid);
DAOFactory.GenericDAO.Delete(confirmationReceiptSignatureToDelete);
}
catch(Exception exception)
{
throw Utils.CreateBeWoFaultException(exception);
}
}
public ConfirmationReceiptSignatureDC UpdateConfirmationReceiptSignature(ConfirmationReceiptSignatureDC confirmationReceiptSignature)
{
try
{
var confirmationReceiptSignatureToUpdate = DAOFactory.GenericDAO.LoadByID<ConfirmationReceiptSignature>(confirmationReceiptSignature.ConfirmationReceiptSignatureOid.Value);
MapperFactory.ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature.MergeWithEntity(confirmationReceiptSignature, confirmationReceiptSignatureToUpdate);
DAOFactory.GenericDAO.Update(confirmationReceiptSignatureToUpdate);
var updatedConfirmationReceiptSignature = DAOFactory.GenericDAO.LoadByID<ConfirmationReceiptSignature>(confirmationReceiptSignature.ConfirmationReceiptSignatureOid.Value);
return MapperFactory.ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature.MapToNewDC(updatedConfirmationReceiptSignature);
}
catch(Exception exception)
{
throw Utils.CreateBeWoFaultException(exception);
}
}
public List<ConfirmationReceiptSignatureDC> GetConfirmationReceiptSignaturesByEmployee(long employeeOid, DateTimeSpan timeSpan)
{
try
{
var signatures = DAOFactory.SearchDAO.GetConfirmationReceiptSignaturesByEmployee(employeeOid, timeSpan);
var signatureDCs = MapperFactory.ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature.MapToNewDCs(signatures);
return signatureDCs;
}
catch(Exception exception)
{
throw Utils.CreateBeWoFaultException(exception);
}
}
public List<ConfirmationReceiptSignatureDC> GetConfirmationReceiptSignaturesByServiceRecord(long serviceRecordOid)
{
try
{
var signatures = DAOFactory.SearchDAO.GetConfirmationReceiptSignaturesByServiceRecord(serviceRecordOid);
var signatureDCs = MapperFactory.ConfirmationReceiptSignatureDC_ConfirmationReceiptSignature.MapToNewDCs(signatures);
return signatureDCs;
}
catch(Exception exception)
{
throw Utils.CreateBeWoFaultException(exception);
}
}
}
}

View File

@@ -148,9 +148,10 @@ namespace BS.Shared
Arbeitszeit = 141,
ArbeitszeitEintrag = 142,
Dienst = 143,
RatingType = 144,
Rating = 145,
GoalRating = 146
RatingType = 144,
Rating = 145,
GoalRating = 146,
ConfirmationReceiptSignature = 147
}
public enum SystemEntryID

View File

@@ -0,0 +1,24 @@
using System.Collections.Generic;
using System.Runtime.Serialization;
namespace BS.Shared.DataContracts
{
[DataContract]
public class ConfirmationReceiptSignatureDC : IDataContract
{
[DataMember]
public long? ConfirmationReceiptSignatureOid { get; set; }
[DataMember]
public long? ConfirmationReceiptSignatureVersion { get; set; }
[DataMember]
public string SignatureImage { get; set; }
[DataMember]
public long? EmployeeOid { get; set; }
[DataMember]
public List<ServiceRecordDC> ServiceRecords { get; set; }
}
}

View File

@@ -150,6 +150,7 @@
<Compile Include="DataContracts\AdditionalServiceGroupOfPeopleDC.cs" />
<Compile Include="DataContracts\AdditionalServiceGroupOfPeopleRelationDC.cs" />
<Compile Include="DataContracts\AdditionalServiceRegionDC.cs" />
<Compile Include="DataContracts\ConfirmationReceiptSignatureDC.cs" />
<Compile Include="DataContracts\DienstDC.cs" />
<Compile Include="DataContracts\ClientPartials\VertretungsItemDC.cs" />
<Compile Include="DataContracts\GoalRatingDC.cs" />