DESKTOP-G961P6V\Zhh 2 years ago
parent
commit
47071d38e2
  1. 16
      src/Shentun.Peis.Domain/CustomerOrgs/CustomerOrgManager.cs
  2. 2
      src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs

16
src/Shentun.Peis.Domain/CustomerOrgs/CustomerOrgManager.cs

@ -104,7 +104,8 @@ namespace Shentun.Peis.CustomerOrgs
Remark = entity.Remark,
ShortName = entity.ShortName,
IsActive = entity.IsActive,
Telephone = entity.Telephone
Telephone = entity.Telephone,
CountryOrgCode = entity.CountryOrgCode
};
}
@ -162,6 +163,7 @@ namespace Shentun.Peis.CustomerOrgs
targetEntity.ShortName = sourceEntity.ShortName;
targetEntity.IsActive = sourceEntity.IsActive;
targetEntity.Telephone = sourceEntity.Telephone;
targetEntity.CountryOrgCode = sourceEntity.CountryOrgCode;
}
@ -227,7 +229,8 @@ namespace Shentun.Peis.CustomerOrgs
{
//最大pathcode
var LastPathCode = (await _repository.GetListAsync(o => o.ParentId == Guid.Empty || o.ParentId == null))
.OrderByDescending(o => {
.OrderByDescending(o =>
{
var sortCode = o.PathCode.Replace(".", "");
return Convert.ToInt32(sortCode);
}
@ -251,7 +254,8 @@ namespace Shentun.Peis.CustomerOrgs
//最大pathcode
var LastPathCode = (await _repository.GetListAsync(o => o.ParentId == parentId))
.OrderByDescending(o => {
.OrderByDescending(o =>
{
var sortCode = o.PathCode.Replace(".", "");
return Convert.ToInt32(sortCode);
}).Select(s => s.PathCode).FirstOrDefault();
@ -306,12 +310,12 @@ namespace Shentun.Peis.CustomerOrgs
public async Task<CustomerOrg> GetTopCustomerOrgAsync(Guid CustomerOrgId)
{
var entity = await _repository.GetAsync(CustomerOrgId);
if(entity.Id == GuidFlag.PersonCustomerOrgId)
var entity = await _repository.GetAsync(CustomerOrgId);
if (entity.Id == GuidFlag.PersonCustomerOrgId)
{
return entity;
}
if(entity.PathCode.Length == 5)
if (entity.PathCode.Length == 5)
{
return entity;
}

2
src/Shentun.Peis.HttpApi.Host/PeisHttpApiHostModule.cs

@ -488,7 +488,7 @@ public class PeisHttpApiHostModule : AbpModule
app.UseStaticFiles(new StaticFileOptions
{
FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), "UpLoad")),
RequestPath = "/UpLoad"
RequestPath = "/photo"
});

Loading…
Cancel
Save