Merge branch 'master' of ssh://float.beyondsoft.de/git/beyondSoft/BeWo
This commit is contained in:
@@ -3146,23 +3146,28 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
// TODO: CompactPersonDCs benutzen
|
||||
public List<CompactCustomerDC> GetAllChatActiveCustomersCompact(long personOid)
|
||||
{
|
||||
try
|
||||
{
|
||||
var customers = DAOFactory.SearchDAO.FindAllChatActiveCustomers();
|
||||
|
||||
var employee = DAOFactory.SearchDAO.FindEmployeeWithPersonOid(personOid);
|
||||
var chatpartner = DAOFactory.SearchDAO.FindAllChatpartnerEmployee2Customer(personOid);
|
||||
|
||||
var customeroids = employee.Employee2CustomerList.Select(s => s.CustomerOid.Value);
|
||||
List<Customer> customerpartner = new List<Customer>();
|
||||
|
||||
foreach (var x in customers)
|
||||
{
|
||||
foreach (var y in chatpartner)
|
||||
{
|
||||
if (x.Oid == y.CustomerOid)
|
||||
{
|
||||
customerpartner.Add(x);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
return MapperFactory.CompactCustomerDC_Customer.MapToNewDCs(customers);
|
||||
return MapperFactory.CompactCustomerDC_Customer.MapToNewDCs(customerpartner);
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
@@ -3204,7 +3209,7 @@ namespace BeWo.Service.ServiceImplementations
|
||||
{
|
||||
var messages = DAOFactory.SearchDAO.FindAllEmpfängerChatMessages(senderOid, empfaengerOid);
|
||||
|
||||
// var updateGelesen = MapperFactory.ChatMessagesDC_ChatMessages.MapToNewDCs(messages);
|
||||
// var updateGelesen = MapperFactory.ChatMessagesDC_ChatMessages.MapToNewDCs(messages);
|
||||
|
||||
foreach (var read in messages)
|
||||
{
|
||||
@@ -3253,6 +3258,21 @@ namespace BeWo.Service.ServiceImplementations
|
||||
}
|
||||
}
|
||||
|
||||
public Byte[] GetCustomerThumbnail(long customerOid)
|
||||
{
|
||||
try
|
||||
{
|
||||
|
||||
var customer = DAOFactory.GenericDAO.GetByID<Customer>(customerOid);
|
||||
|
||||
return customer.Thumbnail;
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
throw Utils.CreateBeWoFaultException(e);
|
||||
}
|
||||
}
|
||||
|
||||
private static String SerializeObject(object obj)
|
||||
{
|
||||
return JsonConvert.SerializeObject(obj, Formatting.Indented, new JsonSerializerSettings { ContractResolver = new ShouldSerializeContractResolver(), ReferenceLoopHandling = ReferenceLoopHandling.Ignore });
|
||||
|
||||
Reference in New Issue
Block a user