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

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

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

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

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

Loading…
Cancel
Save