Merge branch 'master' of ssh://float.beyondsoft.de/git/beyondSoft/BeWo
# Conflicts: # BeWo/ServiceProxy/Generated.cs
This commit is contained in:
@@ -1362,6 +1362,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.AdditionalServiceBookingDC>))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AdditionalServiceBookingDC))]
|
||||
[System.ServiceModel.ServiceKnownTypeAttribute(typeof(BS.Shared.DataContracts.AdditionalServiceRegionDC))]
|
||||
@@ -4887,6 +4889,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/InsertNewAdditionalServiceBookings", ReplyAction="http://tempuri.org/IOperationsService/InsertNewAdditionalServiceBookingsResponse")]
|
||||
[System.ServiceModel.FaultContractAttribute(typeof(BeWo.ServiceProxy.BeWoFault), Action="http://tempuri.org/IOperationsService/InsertNewAdditionalServiceBookingsBeWoFault" +
|
||||
"Fault", Name="BeWoFault", Namespace="http://schemas.datacontract.org/2004/07/BeWo.Service.ServiceContracts")]
|
||||
@@ -5926,6 +5962,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 System.Collections.Generic.List<long> InsertNewAdditionalServiceBookings(System.Collections.Generic.List<BS.Shared.DataContracts.AdditionalServiceBookingDC> pAdditionalServiceBookings)
|
||||
{
|
||||
return base.Channel.InsertNewAdditionalServiceBookings(pAdditionalServiceBookings);
|
||||
|
||||
@@ -11,6 +11,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Data", "Data\Data.csproj",
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Shared", "Shared\Shared.csproj", "{2F50B83D-A3F0-4EC4-979A-3F9B7E3D8ED4}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Report", "Report\Report.csproj", "{40D8B312-EA64-49E3-A31A-5E57ED4D5654}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@@ -42,6 +44,12 @@ Global
|
||||
{2F50B83D-A3F0-4EC4-979A-3F9B7E3D8ED4}.DebugRemote|Any CPU.Build.0 = DebugRemote|Any CPU
|
||||
{2F50B83D-A3F0-4EC4-979A-3F9B7E3D8ED4}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2F50B83D-A3F0-4EC4-979A-3F9B7E3D8ED4}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{40D8B312-EA64-49E3-A31A-5E57ED4D5654}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{40D8B312-EA64-49E3-A31A-5E57ED4D5654}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{40D8B312-EA64-49E3-A31A-5E57ED4D5654}.DebugRemote|Any CPU.ActiveCfg = DebugRemote|Any CPU
|
||||
{40D8B312-EA64-49E3-A31A-5E57ED4D5654}.DebugRemote|Any CPU.Build.0 = DebugRemote|Any CPU
|
||||
{40D8B312-EA64-49E3-A31A-5E57ED4D5654}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{40D8B312-EA64-49E3-A31A-5E57ED4D5654}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@@ -184,6 +184,7 @@
|
||||
<Compile Include="Util\BeWoLoginState.cs" />
|
||||
<Compile Include="Util\BootstrapTreeViewItem.cs" />
|
||||
<Compile Include="Util\ConvertedDateTimes.cs" />
|
||||
<Compile Include="Util\FormCollectionConstants.cs" />
|
||||
<Compile Include="Util\GoalTreeItem.cs" />
|
||||
<Compile Include="Controllers\LoginController.cs" />
|
||||
<Compile Include="Controllers\MainController.cs" />
|
||||
@@ -192,6 +193,7 @@
|
||||
<Compile Include="Util\HtmlHelperExtensions.cs" />
|
||||
<Compile Include="Util\JsonAbsenceTime.cs" />
|
||||
<Compile Include="Util\JsonCustomer.cs" />
|
||||
<Compile Include="Util\QuittierungsbelegItem.cs" />
|
||||
<Compile Include="Util\RecurrenceInformation.cs" />
|
||||
<Compile Include="Global.asax.cs">
|
||||
<DependentUpon>Global.asax</DependentUpon>
|
||||
@@ -576,6 +578,10 @@
|
||||
<Project>{b0d73e3d-4ae7-4024-93a6-db1f46d7ccee}</Project>
|
||||
<Name>Data</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Report\Report.csproj">
|
||||
<Project>{40D8B312-EA64-49E3-A31A-5E57ED4D5654}</Project>
|
||||
<Name>Report</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Service\Service.csproj">
|
||||
<Project>{094331c3-ecee-4c89-bbfd-4c9ded89f0ef}</Project>
|
||||
<Name>Service</Name>
|
||||
|
||||
@@ -5,6 +5,7 @@ using System.Web.Mvc;
|
||||
|
||||
using BeWoPlanerMobil.Models;
|
||||
using BeWoPlanerMobil.Service;
|
||||
using BeWoPlanerMobil.Util;
|
||||
using BS.Shared;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
@@ -15,8 +16,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
public class CustomerController : AbstractBaseController
|
||||
{
|
||||
public static string CustomerModelModelSessionKey = "CustomerModelModel";
|
||||
|
||||
private CustomerModel _Model;
|
||||
public CustomerModel Model
|
||||
{
|
||||
@@ -28,14 +27,14 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return null;
|
||||
}
|
||||
|
||||
if (((CustomerModel) Session[CustomerModelModelSessionKey])?.Employee == null)
|
||||
if (((CustomerModel) Session[ModelSessionConstants.CustomerModelKey])?.Employee == null)
|
||||
{
|
||||
_Model = new CustomerModel{Employee = MobileSessionFacade.LoggedInEmployee};
|
||||
Session[CustomerModelModelSessionKey] = _Model;
|
||||
Session[ModelSessionConstants.CustomerModelKey] = _Model;
|
||||
}
|
||||
else
|
||||
{
|
||||
_Model = (CustomerModel)Session[CustomerModelModelSessionKey];
|
||||
_Model = (CustomerModel)Session[ModelSessionConstants.CustomerModelKey];
|
||||
}
|
||||
|
||||
return _Model;
|
||||
@@ -103,7 +102,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
}
|
||||
|
||||
var selectedCustomerOidString = formCollection["SelectedCustomerOid"];
|
||||
var selectedCustomerOidString = formCollection[FormCollectionConstants.SelectedCustomerOidKey];
|
||||
if (long.TryParse(selectedCustomerOidString, out var selectedCustomerOid))
|
||||
{
|
||||
Model.SelectedCustomerOid = selectedCustomerOid == -1 ? (long?) null : selectedCustomerOid;
|
||||
|
||||
@@ -42,22 +42,20 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return null;
|
||||
}
|
||||
|
||||
if(((MainModel) Session[MainModelSessionKey])?.Employee == null)
|
||||
if(((MainModel) Session[ModelSessionConstants.MainModelKey])?.Employee == null)
|
||||
{
|
||||
_Model = new MainModel { Employee = MobileSessionFacade.LoggedInEmployee };
|
||||
Session[MainModelSessionKey] = _Model;
|
||||
Session[ModelSessionConstants.MainModelKey] = _Model;
|
||||
}
|
||||
else
|
||||
{
|
||||
_Model = (MainModel) Session[MainModelSessionKey];
|
||||
_Model = (MainModel) Session[ModelSessionConstants.MainModelKey];
|
||||
}
|
||||
|
||||
return _Model;
|
||||
}
|
||||
}
|
||||
|
||||
private const string MainModelSessionKey = "MainModel";
|
||||
|
||||
private Dictionary<long, ValueListEntryDC> _ParentGoals;
|
||||
|
||||
private static readonly List<ValueListEntryType> _Zieltypen = new List<ValueListEntryType> { ValueListEntryType.SupportConceptGoalCategoryType, ValueListEntryType.SupportConceptIndividualGoalCategoryType };
|
||||
@@ -245,7 +243,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
}
|
||||
|
||||
var newValue = "true,false" == collection["ShowOnlyOwnSupportConcepts"];
|
||||
var newValue = "true,false" == collection[FormCollectionConstants.ShowOnlyOwnSupportConceptsKey];
|
||||
|
||||
Model.ShowOnlyOwnSupportConcepts = newValue;
|
||||
|
||||
@@ -261,7 +259,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
}
|
||||
|
||||
var newValue = "true,false" == pCollection["ShowExpiredSupportConcepts"];
|
||||
var newValue = "true,false" == pCollection[FormCollectionConstants.ShowExpiredSupportConceptsKey];
|
||||
|
||||
Model.ShowExpiredSupportConcepts = newValue;
|
||||
|
||||
@@ -678,198 +676,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return textModule == null ? null : string.IsNullOrWhiteSpace(textModule.Text) ? textModule.Name : textModule.Text;
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Authorize]
|
||||
public ActionResult CreateServiceRecord(FormCollection collection)
|
||||
{
|
||||
try
|
||||
{
|
||||
if(Model == null)
|
||||
{
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
}
|
||||
|
||||
if (string.IsNullOrEmpty(collection["Datum"]) || Model.NewServiceRecord == null)
|
||||
{
|
||||
return View("Main", Model);
|
||||
}
|
||||
|
||||
string doku1;
|
||||
var distanceInMeters = 0;
|
||||
var dauer = 0;
|
||||
var serviceDescOid = 0L;
|
||||
|
||||
if(Model.Dokutypes != null && Model.Dokutypes.Length > 0)
|
||||
{
|
||||
doku1 = collection["Dokumentation1"];
|
||||
}
|
||||
else
|
||||
{
|
||||
doku1 = collection["Dokumentation6"];
|
||||
}
|
||||
|
||||
var doku2 = collection["Dokumentation2"];
|
||||
var doku3 = collection["Dokumentation3"];
|
||||
var doku4 = collection["Dokumentation4"];
|
||||
var doku5 = collection["Dokumentation5"];
|
||||
var distanz = collection["Distanz"];
|
||||
var start = collection["Start"];
|
||||
var ende = collection["Ende"];
|
||||
var endDateString = collection["Enddatum"];
|
||||
|
||||
var selectedCostbearerScRelOid = Model.CostBearer2SupportConceptOid < 1 ? null : Model.CostBearer2SupportConceptOid;
|
||||
var datum = Convert.ToDateTime(collection["Datum"]);
|
||||
|
||||
if(!string.IsNullOrEmpty(distanz))
|
||||
{
|
||||
if(int.TryParse(distanz, out var parsedDistance))
|
||||
{
|
||||
distanceInMeters = parsedDistance;
|
||||
}
|
||||
}
|
||||
|
||||
Log.Info($"CreateServiceRecord: datum:{collection["Datum"]}; start:{collection["Start"]}; ende:{collection["Ende"]}; dauer:{collection["Dauer"]}; doku:{doku1}; aktion:{collection["versteckt"]}");
|
||||
|
||||
var enddatum = datum;
|
||||
|
||||
if(endDateString != null)
|
||||
{
|
||||
enddatum = Convert.ToDateTime(endDateString);
|
||||
}
|
||||
|
||||
if(datum > enddatum) {
|
||||
enddatum = datum;
|
||||
}
|
||||
|
||||
if(!string.IsNullOrEmpty(collection["Dauer"]))
|
||||
{
|
||||
int.TryParse(collection["Dauer"], out dauer);
|
||||
}
|
||||
|
||||
var zeitenFeld = new DateTime[2];
|
||||
|
||||
if(start == string.Empty && ende == string.Empty)
|
||||
{
|
||||
zeitenFeld[0] = new DateTime(datum.Year, datum.Month, datum.Day, 0, 0, 1);
|
||||
|
||||
if(enddatum == datum)
|
||||
{
|
||||
zeitenFeld[1] = new DateTime(datum.Year, datum.Month, datum.Day, 0, 0, 1).AddMinutes(dauer);
|
||||
}
|
||||
else
|
||||
{
|
||||
zeitenFeld[1] = new DateTime(enddatum.Year, enddatum.Month, enddatum.Day, 0, 0, 1).AddMinutes(dauer);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
zeitenFeld = enddatum == datum ? ConvertRecordTimes(start, ende, datum, dauer) : ConvertRecordTimesWithEndDate(start, ende, datum, enddatum, dauer);
|
||||
}
|
||||
|
||||
if(dauer == 0 || zeitenFeld[1] != zeitenFeld[0])
|
||||
{
|
||||
dauer = (int) (zeitenFeld[1] - zeitenFeld[0]).TotalMinutes;
|
||||
}
|
||||
|
||||
Model.NewServiceRecord.IP = Request.UserHostAddress;
|
||||
Model.NewServiceRecord.Goals = Model.SelectedGoals;
|
||||
Model.NewServiceRecord.Start = zeitenFeld[0];
|
||||
Model.NewServiceRecord.End = zeitenFeld[1];
|
||||
Model.NewServiceRecord.DistanceInMeter = distanceInMeters;
|
||||
|
||||
if(Model.Employee.EmployeeOid != null)
|
||||
{
|
||||
Model.NewServiceRecord.Employee = Model.SelectedEmployee ?? MobileSessionFacade.LoggedInCompactEmployee;
|
||||
|
||||
var sc = Model.SupportConcepts.FirstOrDefault(fod => fod.CostBearerRelations.Any(a => a.CostBearer2SupportConceptOid.HasValue && a.CostBearer2SupportConceptOid.Value.Equals(selectedCostbearerScRelOid)));
|
||||
if(sc != null)
|
||||
{
|
||||
if(sc.SupportConceptOid != null)
|
||||
{
|
||||
Model.NewServiceRecord.SupportConcept = CustomerService.LoadCompactSupportConceptDC(sc.SupportConceptOid.Value, Model.Employee.EmployeeOid);
|
||||
}
|
||||
|
||||
Model.NewServiceRecord.Customer = sc.Customer;
|
||||
|
||||
var cb2ScRel = sc.CostBearerRelations.First(f => f.CostBearer2SupportConceptOid.HasValue && f.CostBearer2SupportConceptOid.Equals(selectedCostbearerScRelOid));
|
||||
Model.NewServiceRecord.CostBearer = cb2ScRel.CostBearer;
|
||||
|
||||
var intervall = Model.NewServiceRecord.CostBearer.ActualMinuteIntervall;
|
||||
|
||||
if(intervall > 0)
|
||||
{
|
||||
Model.NewServiceRecord.RoundedDuration = dauer % intervall != 0 ? dauer + (intervall - dauer % intervall) : dauer;
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.NewServiceRecord.RoundedDuration = dauer;
|
||||
}
|
||||
|
||||
Model.NewServiceRecord.CostBearer2SupportConceptOid = selectedCostbearerScRelOid;
|
||||
}
|
||||
else
|
||||
{
|
||||
Model.NewServiceRecord.RoundedDuration = dauer;
|
||||
}
|
||||
}
|
||||
|
||||
Model.NewServiceRecord.DurationInStunden = ZeiterfassungsDauer.Minuten;
|
||||
|
||||
Model.NewServiceRecord.ServiceRecordFormat = ServiceRecordFormate.OriginaleZeiterfassung;
|
||||
|
||||
Model.NewServiceRecord.Notice = string.IsNullOrEmpty(doku1) ? null : doku1;
|
||||
|
||||
Model.NewServiceRecord.Notice2 = string.IsNullOrEmpty(doku2) ? null : doku2;
|
||||
Model.NewServiceRecord.Notice3 = string.IsNullOrEmpty(doku3) ? null : doku3;
|
||||
Model.NewServiceRecord.Notice4 = string.IsNullOrEmpty(doku4) ? null : doku4;
|
||||
Model.NewServiceRecord.Notice5 = string.IsNullOrEmpty(doku5) ? null : doku5;
|
||||
|
||||
if(!string.IsNullOrEmpty(collection["ServiceDescription"]))
|
||||
{
|
||||
serviceDescOid = Convert.ToInt64(collection["ServiceDescription"]);
|
||||
}
|
||||
else if(Model.SelectedServiceDescriptionOid.HasValue)
|
||||
{
|
||||
serviceDescOid = Model.SelectedServiceDescriptionOid.Value;
|
||||
}
|
||||
|
||||
if (serviceDescOid > 0)
|
||||
{
|
||||
Model.NewServiceRecord.ServiceDescription = OperationsService.GetServiceDescription(serviceDescOid);
|
||||
}
|
||||
|
||||
if (Model.NewServiceRecord.RoundedDuration == 0)
|
||||
{
|
||||
Model.NewServiceRecord.RoundedDuration = dauer;
|
||||
}
|
||||
|
||||
Model.NewServiceRecord.IP = Request.UserHostAddress;
|
||||
Model.NewServiceRecord.InsertedOn = DateTime.Now;
|
||||
Model.NewServiceRecord.InsUser = $"{MobileSessionFacade.LoggedInEmployee.FirstName} {MobileSessionFacade.LoggedInEmployee.LastName}";
|
||||
Model.NewServiceRecord.IsCreatedInMobileClient = true;
|
||||
Model.NewServiceRecord.Goals = Model.SelectedGoals;
|
||||
|
||||
var oidList = OperationsService.InsertNewServiceRecords(new List<ServiceRecordDC> { Model.NewServiceRecord });
|
||||
|
||||
Model.ServiceRecordOid = oidList[0];
|
||||
|
||||
Model.NewServiceRecord = new ServiceRecordDC();
|
||||
|
||||
if(selectedCostbearerScRelOid.HasValue)
|
||||
{
|
||||
Model.ServiceRecords = OperationsService.FindServiceRecordsForLastDays(selectedCostbearerScRelOid, Model.Zeitraum, Model.Employee.EmployeeOid).ToList();
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Log.Error(e.Message, e);
|
||||
}
|
||||
|
||||
Model.SaveSignature = Model.ShowSignature && Model.SelectedSupportConcept != null;
|
||||
|
||||
return RedirectToActionPermanent("Main");
|
||||
}
|
||||
|
||||
[HttpPost]
|
||||
[Authorize]
|
||||
public ActionResult CreateOrUpdateServiceRecord(FormCollection collection)
|
||||
@@ -885,21 +691,21 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
if(Model.Dokutypes != null && Model.Dokutypes.Length > 1)
|
||||
{
|
||||
doku1 = collection["Dokumentation1"];
|
||||
doku1 = collection[FormCollectionConstants.Dokumentation1Key];
|
||||
}
|
||||
else
|
||||
{
|
||||
doku1 = collection["Dokumentation6"];
|
||||
doku1 = collection[FormCollectionConstants.Dokumentation6Key];
|
||||
}
|
||||
|
||||
Log.Info($"CreateServiceRecord: datum:{collection["Datum"]}; start:{collection["Start"]}; ende:{collection["Ende"]}; dauer:{collection["Dauer"]}; doku:{doku1}; aktion:{(Model.IsInEditingMode ? "Speichern" : "Anlegen")}");
|
||||
Log.Info($"CreateOrUpdateServiceRecord: datum:{collection[FormCollectionConstants.DateKey]}; start:{collection[FormCollectionConstants.StartKey]}; ende:{collection[FormCollectionConstants.EndKey]}; dauer:{collection[FormCollectionConstants.DurationKey]}; doku:{doku1}; aktion:{(Model.IsInEditingMode ? "Speichern" : "Anlegen")}");
|
||||
|
||||
if(string.IsNullOrEmpty(collection["Datum"]))
|
||||
if(string.IsNullOrEmpty(collection[FormCollectionConstants.DateKey]))
|
||||
{
|
||||
return View("Main", Model);
|
||||
}
|
||||
|
||||
var distanz = collection["Distanz"];
|
||||
var distanz = collection[FormCollectionConstants.DistanceKey];
|
||||
var distanceInMeters = 0;
|
||||
|
||||
if(!string.IsNullOrEmpty(distanz))
|
||||
@@ -911,12 +717,12 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
|
||||
var selectedCostbearerSCRelOid = Model.CostBearer2SupportConceptOid < 1 ? null : Model.CostBearer2SupportConceptOid;
|
||||
var datum = Convert.ToDateTime(collection["Datum"]);
|
||||
var datum = Convert.ToDateTime(collection[FormCollectionConstants.DateKey]);
|
||||
|
||||
var enddatum = datum;
|
||||
|
||||
var start = collection["Start"];
|
||||
var ende = collection["Ende"];
|
||||
var start = collection[FormCollectionConstants.StartKey];
|
||||
var ende = collection[FormCollectionConstants.EndKey];
|
||||
var dauer = 0;
|
||||
|
||||
if(datum > enddatum)
|
||||
@@ -924,15 +730,15 @@ namespace BeWoPlanerMobil.Controllers
|
||||
enddatum = datum;
|
||||
}
|
||||
|
||||
if(!string.IsNullOrEmpty(collection["Dauer"]))
|
||||
if(!string.IsNullOrEmpty(collection[FormCollectionConstants.DurationKey]))
|
||||
{
|
||||
int.TryParse(collection["Dauer"], out dauer);
|
||||
int.TryParse(collection[FormCollectionConstants.DurationKey], out dauer);
|
||||
}
|
||||
|
||||
var doku2 = collection["Dokumentation2"];
|
||||
var doku3 = collection["Dokumentation3"];
|
||||
var doku4 = collection["Dokumentation4"];
|
||||
var doku5 = collection["Dokumentation5"];
|
||||
var doku2 = collection[FormCollectionConstants.Dokumentation2Key];
|
||||
var doku3 = collection[FormCollectionConstants.Dokumentation3Key];
|
||||
var doku4 = collection[FormCollectionConstants.Dokumentation4Key];
|
||||
var doku5 = collection[FormCollectionConstants.Dokumentation5Key];
|
||||
|
||||
var zeitenFeld = new DateTime[2];
|
||||
|
||||
@@ -1038,9 +844,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
var serviceDescOid = 0L;
|
||||
|
||||
if(!string.IsNullOrEmpty(collection["ServiceDescription"]))
|
||||
if(!string.IsNullOrEmpty(collection[FormCollectionConstants.ServiceDescriptionKey]))
|
||||
{
|
||||
serviceDescOid = Convert.ToInt64(collection["ServiceDescription"]);
|
||||
serviceDescOid = Convert.ToInt64(collection[FormCollectionConstants.ServiceDescriptionKey]);
|
||||
}
|
||||
else if(Model.SelectedServiceDescriptionOid.HasValue)
|
||||
{
|
||||
@@ -1501,7 +1307,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
}
|
||||
|
||||
long? cb2ScOid = Convert.ToInt64(formCollection["CostBearer2SupportConceptOid"]);
|
||||
long? cb2ScOid = Convert.ToInt64(formCollection[FormCollectionConstants.CostBearer2SupportConceptOidKey]);
|
||||
|
||||
LoadServiceCategoriesToModel(cb2ScOid);
|
||||
|
||||
@@ -1570,7 +1376,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
}
|
||||
|
||||
Model.ServiceRecordOidToDelete = long.Parse(formCollection["serviceRecordOidHolder"]);
|
||||
Model.ServiceRecordOidToDelete = long.Parse(formCollection[FormCollectionConstants.ServiceRecordOidHolderKey]);
|
||||
|
||||
if (Model.ServiceRecordOidToDelete != null && Model.ServiceRecordOidToDelete > 0 && MobileSessionFacade.LoggedInUser.UserGroups.Any(a => a.Rights.Any(f => f.RightType.Equals(UserRightType.ServiceRecordView_Delete))))
|
||||
{
|
||||
@@ -1642,7 +1448,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
}
|
||||
|
||||
var zeitraum = int.Parse(formCollection["Records"]);
|
||||
var zeitraum = int.Parse(formCollection[FormCollectionConstants.RecordsKey]);
|
||||
if (zeitraum < 0)
|
||||
{
|
||||
zeitraum = 7;
|
||||
@@ -1695,7 +1501,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
}
|
||||
|
||||
var oidString = formCollection["service-record-oid-holder"];
|
||||
var oidString = formCollection[FormCollectionConstants.ServiceRecordOidHolder2Key];
|
||||
|
||||
var wasSuccessful = long.TryParse(oidString, out var serviceRecordOid);
|
||||
|
||||
@@ -2124,9 +1930,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return RedirectToActionPermanent("PreselectCustomer", "Customer", new {Model.SelectedSupportConcept.Customer.CustomerOid});
|
||||
}
|
||||
|
||||
if(Model?.SelectedSupportConcept == null && (CustomerModel)Session[CustomerController.CustomerModelModelSessionKey] != null)
|
||||
if(Model?.SelectedSupportConcept == null && (CustomerModel)Session[ModelSessionConstants.CustomerModelKey] != null)
|
||||
{
|
||||
var customerModel = (CustomerModel) Session[CustomerController.CustomerModelModelSessionKey];
|
||||
var customerModel = (CustomerModel) Session[ModelSessionConstants.CustomerModelKey];
|
||||
customerModel.SelectedCustomerOid = null;
|
||||
customerModel.SelectedCustomer = null;
|
||||
}
|
||||
@@ -2155,7 +1961,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
}
|
||||
|
||||
var isInGroupBookingMode = "true,false" == pFormCollection["IsInGroupBookingMode"];
|
||||
var isInGroupBookingMode = "true,false" == pFormCollection[FormCollectionConstants.IsInGroupBookingModeKey];
|
||||
|
||||
ResetGroupBookingMode(isInGroupBookingMode);
|
||||
|
||||
@@ -2395,8 +2201,8 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return RedirectToActionPermanent("Index", "Login");
|
||||
}
|
||||
|
||||
var isParsingSuccessful2 = long.TryParse(pFormCollection["service-record-oid-holder"], out var serviceRecordOid);
|
||||
var isParsingSuccessful = long.TryParse(pFormCollection["signatureOidHolder"], out var signatureOid);
|
||||
var isParsingSuccessful2 = long.TryParse(pFormCollection[FormCollectionConstants.ServiceRecordOidHolder2Key], out var serviceRecordOid);
|
||||
var isParsingSuccessful = long.TryParse(pFormCollection[FormCollectionConstants.SignatureOidHolderKey], out var signatureOid);
|
||||
if(isParsingSuccessful && isParsingSuccessful2)
|
||||
{
|
||||
var signatureServiceRecord = Model.ServiceRecords.FirstOrDefault(serviceRecord => serviceRecord.ServiceRecordOid.Equals(serviceRecordOid));
|
||||
@@ -2460,21 +2266,21 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
if(Model.Dokutypes != null && Model.Dokutypes.Length > 0)
|
||||
{
|
||||
doku1 = formCollection["Dokumentation1"];
|
||||
doku1 = formCollection[FormCollectionConstants.Dokumentation1Key];
|
||||
}
|
||||
else
|
||||
{
|
||||
doku1 = formCollection["Dokumentation6"];
|
||||
doku1 = formCollection[FormCollectionConstants.Dokumentation6Key];
|
||||
}
|
||||
|
||||
Log.Info($"CreateServiceRecord: datum:{formCollection["Datum"]}; start:{formCollection["Start"]}; ende:{formCollection["Ende"]}; dauer:{formCollection["Dauer"]}; doku:{doku1}; aktion:{formCollection["versteckt"]}");
|
||||
Log.Info($"CreateServiceRecord: datum:{formCollection[FormCollectionConstants.DateKey]}; start:{formCollection[FormCollectionConstants.StartKey]}; ende:{formCollection[FormCollectionConstants.EndKey]}; dauer:{formCollection[FormCollectionConstants.DurationKey]}; doku:{doku1}; aktion:{formCollection[FormCollectionConstants.HiddenInputKey]}");
|
||||
|
||||
if(string.IsNullOrEmpty(formCollection["Datum"]))
|
||||
if(string.IsNullOrEmpty(formCollection[FormCollectionConstants.DateKey]))
|
||||
{
|
||||
return View("Main", Model);
|
||||
}
|
||||
|
||||
var distanz = formCollection["Distanz"];
|
||||
var distanz = formCollection[FormCollectionConstants.DistanceKey];
|
||||
var distanceInMeters = 0;
|
||||
|
||||
if(!string.IsNullOrEmpty(distanz))
|
||||
@@ -2486,18 +2292,18 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
|
||||
var selectedCostbearerScRelOid = Model.CostBearer2SupportConceptOid < 1 ? null : Model.CostBearer2SupportConceptOid;
|
||||
var datum = Convert.ToDateTime(formCollection["Datum"]);
|
||||
var datum = Convert.ToDateTime(formCollection[FormCollectionConstants.DateKey]);
|
||||
|
||||
var enddatum = datum;
|
||||
|
||||
var endDateString = formCollection["Enddatum"];
|
||||
var endDateString = formCollection[FormCollectionConstants.EndDateKey];
|
||||
if(endDateString != null)
|
||||
{
|
||||
enddatum = Convert.ToDateTime(endDateString);
|
||||
}
|
||||
|
||||
var start = formCollection["Start"];
|
||||
var ende = formCollection["Ende"];
|
||||
var start = formCollection[FormCollectionConstants.StartKey];
|
||||
var ende = formCollection[FormCollectionConstants.EndKey];
|
||||
var dauer = 0;
|
||||
|
||||
if(datum > enddatum)
|
||||
@@ -2505,15 +2311,15 @@ namespace BeWoPlanerMobil.Controllers
|
||||
enddatum = datum;
|
||||
}
|
||||
|
||||
if(!string.IsNullOrEmpty(formCollection["Dauer"]))
|
||||
if(!string.IsNullOrEmpty(formCollection[FormCollectionConstants.DurationKey]))
|
||||
{
|
||||
int.TryParse(formCollection["Dauer"], out dauer);
|
||||
int.TryParse(formCollection[FormCollectionConstants.DurationKey], out dauer);
|
||||
}
|
||||
|
||||
var doku2 = formCollection["Dokumentation2"];
|
||||
var doku3 = formCollection["Dokumentation3"];
|
||||
var doku4 = formCollection["Dokumentation4"];
|
||||
var doku5 = formCollection["Dokumentation5"];
|
||||
var doku2 = formCollection[FormCollectionConstants.Dokumentation2Key];
|
||||
var doku3 = formCollection[FormCollectionConstants.Dokumentation3Key];
|
||||
var doku4 = formCollection[FormCollectionConstants.Dokumentation4Key];
|
||||
var doku5 = formCollection[FormCollectionConstants.Dokumentation5Key];
|
||||
|
||||
var zeitenFeld = new DateTime[2];
|
||||
|
||||
@@ -2605,9 +2411,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
var serviceDescOid = 0L;
|
||||
|
||||
if(!string.IsNullOrEmpty(formCollection["ServiceDescription"]))
|
||||
if(!string.IsNullOrEmpty(formCollection[FormCollectionConstants.ServiceDescriptionKey]))
|
||||
{
|
||||
serviceDescOid = Convert.ToInt64(formCollection["ServiceDescription"]);
|
||||
serviceDescOid = Convert.ToInt64(formCollection[FormCollectionConstants.ServiceDescriptionKey]);
|
||||
}
|
||||
else if(Model.SelectedServiceDescriptionOid.HasValue)
|
||||
{
|
||||
@@ -2664,21 +2470,21 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
if(Model.Dokutypes != null && Model.Dokutypes.Length > 0)
|
||||
{
|
||||
doku1 = formCollection["Dokumentation1"];
|
||||
doku1 = formCollection[FormCollectionConstants.Dokumentation1Key];
|
||||
}
|
||||
else
|
||||
{
|
||||
doku1 = formCollection["Dokumentation6"];
|
||||
doku1 = formCollection[FormCollectionConstants.Dokumentation6Key];
|
||||
}
|
||||
|
||||
Log.Info($"EditServiceRecord: datum:{formCollection["Datum"]}; start:{formCollection["Start"]}; ende:{formCollection["Ende"]}; dauer:{formCollection["Dauer"]}; doku:{doku1}; aktion:Speichern");
|
||||
Log.Info($"EditServiceRecord: datum:{formCollection[FormCollectionConstants.DateKey]}; start:{formCollection[FormCollectionConstants.StartKey]}; ende:{formCollection[FormCollectionConstants.EndKey]}; dauer:{formCollection[FormCollectionConstants.DurationKey]}; doku:{doku1}; aktion:Speichern");
|
||||
|
||||
if(string.IsNullOrEmpty(formCollection["Datum"]))
|
||||
if(string.IsNullOrEmpty(formCollection[FormCollectionConstants.DateKey]))
|
||||
{
|
||||
return View("Main", Model);
|
||||
}
|
||||
|
||||
var distanz = formCollection["Distanz"];
|
||||
var distanz = formCollection[FormCollectionConstants.DistanceKey];
|
||||
var distanceInMeters = 0;
|
||||
|
||||
if(!string.IsNullOrEmpty(distanz))
|
||||
@@ -2690,18 +2496,18 @@ namespace BeWoPlanerMobil.Controllers
|
||||
}
|
||||
|
||||
var selectedCostbearer2SupportConceptRelOid = Model.CostBearer2SupportConceptOid < 1 ? null : Model.CostBearer2SupportConceptOid;
|
||||
var datum = Convert.ToDateTime(formCollection["Datum"]);
|
||||
var datum = Convert.ToDateTime(formCollection[FormCollectionConstants.DateKey]);
|
||||
|
||||
var enddatum = datum;
|
||||
|
||||
var endDateString = formCollection["Enddatum"];
|
||||
var endDateString = formCollection[FormCollectionConstants.EndDateKey];
|
||||
if(endDateString != null)
|
||||
{
|
||||
enddatum = Convert.ToDateTime(endDateString);
|
||||
}
|
||||
|
||||
var start = formCollection["Start"];
|
||||
var ende = formCollection["Ende"];
|
||||
var start = formCollection[FormCollectionConstants.StartKey];
|
||||
var ende = formCollection[FormCollectionConstants.EndKey];
|
||||
var dauer = 0;
|
||||
|
||||
if(datum > enddatum)
|
||||
@@ -2709,15 +2515,15 @@ namespace BeWoPlanerMobil.Controllers
|
||||
enddatum = datum;
|
||||
}
|
||||
|
||||
if(!string.IsNullOrEmpty(formCollection["Dauer"]))
|
||||
if(!string.IsNullOrEmpty(formCollection[FormCollectionConstants.DurationKey]))
|
||||
{
|
||||
int.TryParse(formCollection["Dauer"], out dauer);
|
||||
int.TryParse(formCollection[FormCollectionConstants.DurationKey], out dauer);
|
||||
}
|
||||
|
||||
var doku2 = formCollection["Dokumentation2"];
|
||||
var doku3 = formCollection["Dokumentation3"];
|
||||
var doku4 = formCollection["Dokumentation4"];
|
||||
var doku5 = formCollection["Dokumentation5"];
|
||||
var doku2 = formCollection[FormCollectionConstants.Dokumentation2Key];
|
||||
var doku3 = formCollection[FormCollectionConstants.Dokumentation3Key];
|
||||
var doku4 = formCollection[FormCollectionConstants.Dokumentation4Key];
|
||||
var doku5 = formCollection[FormCollectionConstants.Dokumentation5Key];
|
||||
|
||||
var zeitenFeld = new DateTime[2];
|
||||
|
||||
@@ -2814,9 +2620,9 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
var serviceDescOid = 0L;
|
||||
|
||||
if(!string.IsNullOrEmpty(formCollection["ServiceDescription"]))
|
||||
if(!string.IsNullOrEmpty(formCollection[FormCollectionConstants.ServiceDescriptionKey]))
|
||||
{
|
||||
serviceDescOid = Convert.ToInt64(formCollection["ServiceDescription"]);
|
||||
serviceDescOid = Convert.ToInt64(formCollection[FormCollectionConstants.ServiceDescriptionKey]);
|
||||
}
|
||||
else if(Model.SelectedServiceDescriptionOid.HasValue)
|
||||
{
|
||||
|
||||
@@ -1,7 +1,12 @@
|
||||
using System.Linq;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using BeWo.Report.ReportObjects;
|
||||
using BeWoPlanerMobil.Models;
|
||||
using BeWoPlanerMobil.Service;
|
||||
using BeWoPlanerMobil.Util;
|
||||
using BS.Shared.Core;
|
||||
using BS.Shared.Extensions;
|
||||
|
||||
namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
@@ -10,13 +15,13 @@ namespace BeWoPlanerMobil.Controllers
|
||||
* Mit Unterschriftenfunktion für den Mitarbeiter.
|
||||
* Liste mit allen ServiceRecords des Mitarbeiters für einen Klienten.
|
||||
*
|
||||
* Felder: Mitarbeiter(Ist der eingeloggte, denn nur der darf unterschreiben), Klient, Monat, Vom, Bis, Jahr
|
||||
* TODO: Warnung anzeigen, dass man die betroffenen Einträge nicht mehr ändern kann.
|
||||
*
|
||||
* TODO: Unterschrift zu hinzufügen
|
||||
*/
|
||||
|
||||
public class ReportController : AbstractBaseController
|
||||
{
|
||||
private const string ReportModelSessionKey = "ReportModel";
|
||||
|
||||
private ReportModel _Model;
|
||||
|
||||
public ReportModel Model
|
||||
@@ -29,14 +34,14 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return null;
|
||||
}
|
||||
|
||||
if(((ReportModel) Session[ReportModelSessionKey])?.Employee == null)
|
||||
if(((ReportModel) Session[ModelSessionConstants.ReportModelKey])?.Employee == null)
|
||||
{
|
||||
_Model = new ReportModel {Employee = MobileSessionFacade.LoggedInEmployee};
|
||||
Session[ReportModelSessionKey] = _Model;
|
||||
Session[ModelSessionConstants.ReportModelKey] = _Model;
|
||||
}
|
||||
else
|
||||
{
|
||||
_Model = (ReportModel) Session[ReportModelSessionKey];
|
||||
_Model = (ReportModel) Session[ModelSessionConstants.ReportModelKey];
|
||||
}
|
||||
|
||||
return _Model;
|
||||
@@ -55,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);
|
||||
}
|
||||
|
||||
@@ -62,30 +69,43 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[HttpPost]
|
||||
public ActionResult CreateServiceOverview(FormCollection formCollection)
|
||||
{
|
||||
if(Model == null)
|
||||
if(Model?.Employee?.EmployeeOid == null)
|
||||
{
|
||||
return Logout();
|
||||
}
|
||||
|
||||
var customerOidString = formCollection["SelectedCustomerOid"];
|
||||
var monthString = formCollection["SelectedMonth"];
|
||||
var yearString = formCollection["SelectedYear"];
|
||||
var customerOidString = formCollection[FormCollectionConstants.SelectedCustomerOidKey];
|
||||
var monthString = formCollection[FormCollectionConstants.SelectedMonthKey];
|
||||
var yearString = formCollection[FormCollectionConstants.SelectedYearKey];
|
||||
|
||||
var isCustomerOidSuccessful = long.TryParse(customerOidString, out var customerOid);
|
||||
var isMonthSuccessful = int.TryParse(monthString, out var month);
|
||||
var isYearSuccessful = int.TryParse(yearString, out var year);
|
||||
var isMonthSuccessful = int.TryParse(monthString, out var month);
|
||||
var isYearSuccessful = int.TryParse(yearString, out var year);
|
||||
|
||||
if(!isCustomerOidSuccessful || !isMonthSuccessful || !isYearSuccessful)
|
||||
{
|
||||
return Report();
|
||||
}
|
||||
|
||||
Model.QuittierungsbelegItems.Clear();
|
||||
|
||||
var selectedCustomer = Model.Customers.FirstOrDefault(customer => customer.CustomerOid == customerOid);
|
||||
|
||||
Model.SelectedCustomer = selectedCustomer;
|
||||
Model.SelectedYear = year;
|
||||
Model.SelectedMonth = month;
|
||||
Model.SelectedYear = year;
|
||||
Model.SelectedMonth = month;
|
||||
|
||||
var startDay = new DateTime(year, month, 1);
|
||||
var endDay = startDay.AddMonths(1).AddDays(-1);
|
||||
|
||||
var reportObject = ServicesOverviewRO.Create(customerOid, month, year, false, 0L, Model.Employee.EmployeeOid.Value, 1, endDay.Day, null);
|
||||
|
||||
reportObject.Services.DoForEach(serviceDetail => { Model.QuittierungsbelegItems.Add(new QuittierungsbelegItem(serviceDetail)); });
|
||||
|
||||
if(Model.QuittierungsbelegItems.Count == 0)
|
||||
{
|
||||
TempData["HasWarningMessage"] = true;
|
||||
}
|
||||
|
||||
return RedirectToActionPermanent("Report");
|
||||
}
|
||||
@@ -102,5 +122,14 @@ namespace BeWoPlanerMobil.Controllers
|
||||
|
||||
return _LeerzeichenFuerGetMethoden;
|
||||
}
|
||||
|
||||
[Authorize]
|
||||
[HttpPost]
|
||||
public ActionResult CreateEmployeeSignatureForServiceOverview(FormCollection formCollection)
|
||||
{
|
||||
|
||||
|
||||
return RedirectToActionPermanent("Report");
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -6,6 +6,7 @@ using System.Web.Mvc;
|
||||
|
||||
using BeWoPlanerMobil.Models;
|
||||
using BeWoPlanerMobil.Service;
|
||||
using BeWoPlanerMobil.Util;
|
||||
using BS.Shared.DataContracts;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
using BS.Shared.Extensions;
|
||||
@@ -19,8 +20,6 @@ namespace BeWoPlanerMobil.Controllers
|
||||
{
|
||||
public class SchedulerController : AbstractBaseController
|
||||
{
|
||||
private const string SchedulerModelSessionKey = "SchedulerModel";
|
||||
|
||||
private SchedulerModel _Model;
|
||||
public SchedulerModel Model
|
||||
{
|
||||
@@ -32,14 +31,14 @@ namespace BeWoPlanerMobil.Controllers
|
||||
return null;
|
||||
}
|
||||
|
||||
if (((SchedulerModel) Session[SchedulerModelSessionKey])?.Employee == null)
|
||||
if (((SchedulerModel) Session[ModelSessionConstants.SchedulerModelKey])?.Employee == null)
|
||||
{
|
||||
_Model = new SchedulerModel { Employee = MobileSessionFacade.LoggedInEmployee };
|
||||
Session[SchedulerModelSessionKey] = _Model;
|
||||
Session[ModelSessionConstants.SchedulerModelKey] = _Model;
|
||||
}
|
||||
else
|
||||
{
|
||||
_Model = (SchedulerModel) Session[SchedulerModelSessionKey];
|
||||
_Model = (SchedulerModel) Session[ModelSessionConstants.SchedulerModelKey];
|
||||
}
|
||||
|
||||
return _Model;
|
||||
@@ -191,13 +190,13 @@ namespace BeWoPlanerMobil.Controllers
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
}
|
||||
|
||||
var rawStartDate = formCollection["StartDate"];
|
||||
var rawEndDate = formCollection["EndDate"];
|
||||
var rawStartTime = formCollection["StartTime"];
|
||||
var rawEndTime = formCollection["EndTime"];
|
||||
var subject = formCollection["Subject"];
|
||||
var location = formCollection["Location"];
|
||||
var notice = formCollection["Notice"];
|
||||
var rawStartDate = formCollection[FormCollectionConstants.AppointmentStartDateKey];
|
||||
var rawEndDate = formCollection[FormCollectionConstants.AppointmentEndDateKey];
|
||||
var rawStartTime = formCollection[FormCollectionConstants.AppointmentStartTimeKey];
|
||||
var rawEndTime = formCollection[FormCollectionConstants.AppointmentEndTimeKey];
|
||||
var subject = formCollection[FormCollectionConstants.AppointmentSubjectKey];
|
||||
var location = formCollection[FormCollectionConstants.AppointmentLocationKey];
|
||||
var notice = formCollection[FormCollectionConstants.AppointmentNoticeKey];
|
||||
|
||||
var isSuccessfulStartTime = DateTime.TryParseExact(rawStartTime, "HH:mm", null, DateTimeStyles.None, out var startTime);
|
||||
var isSuccessfulEndTime = DateTime.TryParseExact(rawEndTime, "HH:mm", null, DateTimeStyles.None, out var endTime);
|
||||
@@ -301,7 +300,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
RedirectToActionPermanent("Index", "Login");
|
||||
}
|
||||
|
||||
var rawSchedulerDate = formCollection["SchedulerDate"];
|
||||
var rawSchedulerDate = formCollection[FormCollectionConstants.AppointmentSchedulerDateKey];
|
||||
|
||||
var schedulerDate = DateTime.ParseExact(rawSchedulerDate, "dd.MM.yyyy", null);
|
||||
|
||||
@@ -320,7 +319,7 @@ namespace BeWoPlanerMobil.Controllers
|
||||
[HttpPost]
|
||||
public ActionResult SelectAppointmentToEdit(FormCollection formCollection)
|
||||
{
|
||||
var rawOid = formCollection["scheduler-oid-holder"];
|
||||
var rawOid = formCollection[FormCollectionConstants.AppointmentSchedulerOidHolderKey];
|
||||
|
||||
var isSuccessful = long.TryParse(rawOid, out var appointmentOid);
|
||||
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -431,9 +431,35 @@ namespace BeWoPlanerMobil.Models
|
||||
|
||||
public string EndDateToEdit => SelectedServiceRecord?.End?.ToShortDateString() ?? DateTime.Today.ToShortDateString();
|
||||
|
||||
public string StartTimeToEdit => SelectedServiceRecord?.Start?.ToString("HH:mm") ?? string.Empty;
|
||||
public string StartTimeToEdit
|
||||
{
|
||||
get
|
||||
{
|
||||
var start = SelectedServiceRecord?.Start;
|
||||
|
||||
public string EndTimeToEdit => SelectedServiceRecord?.End?.ToString("HH:mm") ?? string.Empty;
|
||||
if(start != null && !(start.Value.GetServiceRecordNoDateTimeDate().Equals(start)))
|
||||
{
|
||||
return start.Value.ToString("HH:mm");
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public string EndTimeToEdit
|
||||
{
|
||||
get
|
||||
{
|
||||
var end = SelectedServiceRecord?.End;
|
||||
|
||||
if(end != null && !end.Value.GetServiceRecordNoDateTimeDate().Equals(end))
|
||||
{
|
||||
return end.Value.ToString("HH:mm");
|
||||
}
|
||||
|
||||
return string.Empty;
|
||||
}
|
||||
}
|
||||
|
||||
public string DurationToEdit => SelectedServiceRecord?.RoundedDuration.ToString() ?? string.Empty;
|
||||
|
||||
|
||||
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
||||
using System.ComponentModel.DataAnnotations;
|
||||
using System.Linq;
|
||||
using System.Web.Mvc;
|
||||
using BeWoPlanerMobil.Util;
|
||||
using BS.Shared.DataContracts.Compact;
|
||||
|
||||
namespace BeWoPlanerMobil.Models
|
||||
@@ -42,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;
|
||||
@@ -57,11 +62,17 @@ 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;
|
||||
}
|
||||
}
|
||||
|
||||
public List<QuittierungsbelegItem> QuittierungsbelegItems { get; set; } = new List<QuittierungsbelegItem>();
|
||||
}
|
||||
}
|
||||
@@ -118,6 +118,12 @@ document.addEventListener("DOMContentLoaded", event => {
|
||||
}
|
||||
});
|
||||
|
||||
document.addEventListener("DOMContentLoaded", event => {
|
||||
if ($("#report-sketch-pad").length !== 0) {
|
||||
new Signature();
|
||||
}
|
||||
});
|
||||
|
||||
function prepareSigningPopup(serviceRecordOid) {
|
||||
$("#main-container, #checkbox-container").hide();
|
||||
$("#signature-container").addClass("d-block");
|
||||
@@ -209,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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,29 @@
|
||||
function setSelectedCustomer() {
|
||||
function prepareReportSignature() {
|
||||
$("#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);
|
||||
}
|
||||
55
BeWoPlanerMobil/Util/FormCollectionConstants.cs
Normal file
55
BeWoPlanerMobil/Util/FormCollectionConstants.cs
Normal file
@@ -0,0 +1,55 @@
|
||||
namespace BeWoPlanerMobil.Util
|
||||
{
|
||||
public class FormCollectionConstants
|
||||
{
|
||||
// Zeiterfassung
|
||||
public static string ShowOnlyOwnSupportConceptsKey => "ShowOnlyOwnSupportConcepts";
|
||||
public static string ShowExpiredSupportConceptsKey => "ShowExpiredSupportConcepts";
|
||||
public static string DateKey => "Datum";
|
||||
public static string Dokumentation1Key => "Dokumentation1";
|
||||
public static string Dokumentation2Key => "Dokumentation2";
|
||||
public static string Dokumentation3Key => "Dokumentation3";
|
||||
public static string Dokumentation4Key => "Dokumentation4";
|
||||
public static string Dokumentation5Key => "Dokumentation5";
|
||||
public static string Dokumentation6Key => "Dokumentation6";
|
||||
public static string DistanceKey => "Distanz";
|
||||
public static string StartKey => "Start";
|
||||
public static string EndKey => "Ende";
|
||||
public static string EndDateKey => "Enddatum";
|
||||
public static string DurationKey => "Dauer";
|
||||
public static string HiddenInputKey => "versteckt";
|
||||
public static string ServiceDescriptionKey => "ServiceDescription";
|
||||
public static string CostBearer2SupportConceptOidKey => "CostBearer2SupportConceptOid";
|
||||
public static string ServiceRecordOidHolderKey => "serviceRecordOidHolder";
|
||||
public static string RecordsKey => "Records";
|
||||
public static string ServiceRecordOidHolder2Key => "service-record-oid-holder";
|
||||
public static string IsInGroupBookingModeKey => "IsInGroupBookingMode";
|
||||
public static string SignatureOidHolderKey => "signatureOidHolder";
|
||||
|
||||
|
||||
// Kalender
|
||||
public static string AppointmentStartDateKey => "StartDate";
|
||||
public static string AppointmentStartTimeKey => "StartTime";
|
||||
public static string AppointmentEndDateKey => "EndDate";
|
||||
public static string AppointmentEndTimeKey => "EndTime";
|
||||
public static string AppointmentSubjectKey => "Subject";
|
||||
public static string AppointmentLocationKey => "Location";
|
||||
public static string AppointmentNoticeKey => "Notice";
|
||||
public static string AppointmentSchedulerDateKey => "SchedulerDate";
|
||||
public static string AppointmentSchedulerOidHolderKey => "scheduler-oid-holder";
|
||||
|
||||
|
||||
// Auswertung
|
||||
public static string SelectedCustomerOidKey => "SelectedCustomerOid";
|
||||
public static string SelectedMonthKey => "SelectedMonth";
|
||||
public static string SelectedYearKey => "SelectedYear";
|
||||
}
|
||||
|
||||
public class ModelSessionConstants
|
||||
{
|
||||
public static string ReportModelKey => "ReportModel";
|
||||
public static string CustomerModelKey => "CustomerModelModel";
|
||||
public static string SchedulerModelKey => "SchedulerModel";
|
||||
public static string MainModelKey => "MainModel";
|
||||
}
|
||||
}
|
||||
33
BeWoPlanerMobil/Util/QuittierungsbelegItem.cs
Normal file
33
BeWoPlanerMobil/Util/QuittierungsbelegItem.cs
Normal file
@@ -0,0 +1,33 @@
|
||||
using System;
|
||||
using BeWo.Report.ReportObjects;
|
||||
|
||||
namespace BeWoPlanerMobil.Util
|
||||
{
|
||||
public class QuittierungsbelegItem
|
||||
{
|
||||
public Guid Identifier { get; }
|
||||
|
||||
public string DateTimeString { get; }
|
||||
|
||||
public string Kontaktart { get; set; }
|
||||
|
||||
public int CustomersCount { get; set; }
|
||||
|
||||
public double Minutes { get; set; }
|
||||
|
||||
public string Employees { get; set; }
|
||||
|
||||
|
||||
public QuittierungsbelegItem(ServicesOverviewRO.ServiceDetail serviceDetail)
|
||||
{
|
||||
Kontaktart = serviceDetail.IsGroup ? "GR" : "E";
|
||||
CustomersCount = serviceDetail.CustomerCount;
|
||||
Minutes = serviceDetail.Minutes;
|
||||
Employees = serviceDetail.EmployeeAbbr;
|
||||
|
||||
DateTimeString = $"{serviceDetail.StartDate:dd.MM.yyyy HH:mm} - {serviceDetail.EndDate:HH:mm}";
|
||||
|
||||
Identifier = Guid.NewGuid();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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")";
|
||||
}
|
||||
|
||||
@@ -14,7 +14,7 @@ Info:
|
||||
|
||||
-->
|
||||
|
||||
<div class="container-fluid">
|
||||
<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>
|
||||
@@ -57,5 +57,98 @@ Info:
|
||||
</div>
|
||||
}
|
||||
</div>
|
||||
<div class="col col-12 col-md-6 col-lg-5">
|
||||
<div class="mt-3">
|
||||
@if(TempData["HasWarningMessage"] != null)
|
||||
{
|
||||
<div class="alert alert-primary" role="alert">
|
||||
Es wurden keine auswertbaren Einträge gefunden
|
||||
</div>
|
||||
}
|
||||
else if(Model?.QuittierungsbelegItems?.Count > 0)
|
||||
{
|
||||
foreach(var item in Model.QuittierungsbelegItems)
|
||||
{
|
||||
<div class="card w-100 mb-3">
|
||||
<div class="card-header" data-toggle="collapse" data-target="#collapse-item-@item.Identifier">
|
||||
<h5 class="mb-0">
|
||||
<button class="btn btn-link collapsed" type="button" data-toggle="collapse" data-target="#collapse-item-@item.Identifier">
|
||||
<div class="text-left">
|
||||
<span>@item.DateTimeString</span>
|
||||
</div>
|
||||
</button>
|
||||
</h5>
|
||||
</div>
|
||||
<div class="collapse" id="collapse-item-@item.Identifier">
|
||||
<div class="card-body">
|
||||
<div class="container-fluid">
|
||||
<div class="row">
|
||||
<div class="col text-secondary">
|
||||
Kontaktart:
|
||||
</div>
|
||||
<div class="col">
|
||||
@item.Kontaktart
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col text-secondary">
|
||||
Anzahl Klienten:
|
||||
</div>
|
||||
<div class="col">
|
||||
@item.CustomersCount
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col text-secondary">
|
||||
FLS in Minuten (ohne 1,2):
|
||||
</div>
|
||||
<div class="col">
|
||||
@item.Minutes
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
|
||||
if(Model?.QuittierungsbelegItems?.Count > 0)
|
||||
{
|
||||
<div class="d-flex bd-highlight mt-3">
|
||||
<div class="mr-auto bd-highlight">
|
||||
<!-- Abstandshalter -->
|
||||
</div>
|
||||
<div class="ml-3 bd-highlight">
|
||||
<button type="button" class="btn btn-primary" id="signature-button" onclick="prepareReportSignature()">Unterschreiben</button>
|
||||
</div>
|
||||
</div>
|
||||
}
|
||||
}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<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" 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="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">
|
||||
<div class="col-12">
|
||||
<button type="button" class="btn btn-primary float-right" onclick="saveReportSignature()">Speichern</button>
|
||||
<button type="button" class="btn btn-secondary float-right mr-3" id="clear-canvas-btn">Neu</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@@ -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;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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>
|
||||
|
||||
52
Data/Entities/ConfirmationReceiptSignature.cs
Normal file
52
Data/Entities/ConfirmationReceiptSignature.cs
Normal 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;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
25
Data/Mappings/ConfirmationReceiptSignature.hbm.xml
Normal file
25
Data/Mappings/ConfirmationReceiptSignature.hbm.xml
Normal 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>
|
||||
@@ -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;
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
@@ -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();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
@@ -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
|
||||
|
||||
@@ -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" />
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
@@ -6022,5 +6022,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);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
24
Shared/DataContracts/ConfirmationReceiptSignatureDC.cs
Normal file
24
Shared/DataContracts/ConfirmationReceiptSignatureDC.cs
Normal 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; }
|
||||
}
|
||||
}
|
||||
@@ -548,5 +548,10 @@ namespace BS.Shared.Extensions
|
||||
{
|
||||
return new DateTime(dateTime.Year, dateTime.Month, 1);
|
||||
}
|
||||
|
||||
public static DateTime GetServiceRecordNoDateTimeDate(this DateTime date)
|
||||
{
|
||||
return date.MergeDateAndTimeSpan(new TimeSpan(0, 0, 1));
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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" />
|
||||
|
||||
Reference in New Issue
Block a user