|
@ -33,7 +33,7 @@ namespace Win.Sfs.SettleAccount.Entities.MaterialRelationships |
|
|
/// <summary>
|
|
|
/// <summary>
|
|
|
/// 区域相关应用服务
|
|
|
/// 区域相关应用服务
|
|
|
/// </summary>
|
|
|
/// </summary>
|
|
|
[Authorize(SettleAccountPermissions.MaterialRelationships.Default)] |
|
|
//[Authorize(SettleAccountPermissions.MaterialRelationships.Default)]
|
|
|
//[AllowAnonymous]
|
|
|
//[AllowAnonymous]
|
|
|
[Route("api/settleaccount/MaterialRelationship")] |
|
|
[Route("api/settleaccount/MaterialRelationship")] |
|
|
public class MaterialRelationshipAppService : SettleAccountApplicationBase<MaterialRelationship>, IMaterialRelationshipAppService |
|
|
public class MaterialRelationshipAppService : SettleAccountApplicationBase<MaterialRelationship>, IMaterialRelationshipAppService |
|
@ -72,7 +72,6 @@ namespace Win.Sfs.SettleAccount.Entities.MaterialRelationships |
|
|
[HttpPost] |
|
|
[HttpPost] |
|
|
[Route("ExcelImport-Map")] |
|
|
[Route("ExcelImport-Map")] |
|
|
[DisableRequestSizeLimit] |
|
|
[DisableRequestSizeLimit] |
|
|
[Authorize(SettleAccountPermissions.MaterialRelationships.Create)] |
|
|
|
|
|
public async Task<string> MaterialRelationshipUploadExcelImportMap([FromForm] IFormFileCollection files) |
|
|
public async Task<string> MaterialRelationshipUploadExcelImportMap([FromForm] IFormFileCollection files) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
@ -137,7 +136,6 @@ namespace Win.Sfs.SettleAccount.Entities.MaterialRelationships |
|
|
[HttpPost] |
|
|
[HttpPost] |
|
|
[Route("ExcelImport")] |
|
|
[Route("ExcelImport")] |
|
|
[DisableRequestSizeLimit] |
|
|
[DisableRequestSizeLimit] |
|
|
[Authorize(SettleAccountPermissions.MaterialRelationships.Create)] |
|
|
|
|
|
public async Task<string> MaterialRelationshipUploadExcelImport([FromForm] IFormFileCollection files) |
|
|
public async Task<string> MaterialRelationshipUploadExcelImport([FromForm] IFormFileCollection files) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
@ -203,7 +201,6 @@ namespace Win.Sfs.SettleAccount.Entities.MaterialRelationships |
|
|
/// <returns>实体DTO</returns>
|
|
|
/// <returns>实体DTO</returns>
|
|
|
[HttpGet] |
|
|
[HttpGet] |
|
|
[Route("{id}")] |
|
|
[Route("{id}")] |
|
|
[Authorize(SettleAccountPermissions.MaterialRelationships.Default)] |
|
|
|
|
|
virtual public async Task<MaterialRelationshipDto> GetAsync(Guid id) |
|
|
virtual public async Task<MaterialRelationshipDto> GetAsync(Guid id) |
|
|
{ |
|
|
{ |
|
|
var result = await GetFromCacheAsync(id); |
|
|
var result = await GetFromCacheAsync(id); |
|
@ -241,7 +238,6 @@ namespace Win.Sfs.SettleAccount.Entities.MaterialRelationships |
|
|
/// <returns>实体DTO列表</returns>
|
|
|
/// <returns>实体DTO列表</returns>
|
|
|
[HttpPost] |
|
|
[HttpPost] |
|
|
[Route("list")] |
|
|
[Route("list")] |
|
|
[Authorize(SettleAccountPermissions.MaterialRelationships.Default)] |
|
|
|
|
|
virtual public async Task<PagedResultDto<MaterialRelationshipDto>> GetListAsync(MaterialRelationshipRequestDto input) |
|
|
virtual public async Task<PagedResultDto<MaterialRelationshipDto>> GetListAsync(MaterialRelationshipRequestDto input) |
|
|
{ |
|
|
{ |
|
|
var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, input.MaxResultCount, |
|
|
var entities = await _repository.GetListByFilterAsync(input.BranchId, input.Filters, input.Sorting, input.MaxResultCount, |
|
@ -260,7 +256,6 @@ namespace Win.Sfs.SettleAccount.Entities.MaterialRelationships |
|
|
/// <returns>实体总数</returns>
|
|
|
/// <returns>实体总数</returns>
|
|
|
[HttpGet] |
|
|
[HttpGet] |
|
|
[Route("count")] |
|
|
[Route("count")] |
|
|
[Authorize(SettleAccountPermissions.MaterialRelationships.Default)] |
|
|
|
|
|
virtual public async Task<long> GetTotalCountAsync(Guid branchId) |
|
|
virtual public async Task<long> GetTotalCountAsync(Guid branchId) |
|
|
{ |
|
|
{ |
|
|
return await _repository.GetCountAsync(branchId); |
|
|
return await _repository.GetCountAsync(branchId); |
|
@ -272,7 +267,6 @@ namespace Win.Sfs.SettleAccount.Entities.MaterialRelationships |
|
|
/// <returns>实体DTO列表</returns>
|
|
|
/// <returns>实体DTO列表</returns>
|
|
|
[HttpGet] |
|
|
[HttpGet] |
|
|
[Route("all")] |
|
|
[Route("all")] |
|
|
[Authorize(SettleAccountPermissions.MaterialRelationships.Default)] |
|
|
|
|
|
virtual public async Task<ListResultDto<MaterialRelationshipDto>> GetAllAsync(Guid branchId) |
|
|
virtual public async Task<ListResultDto<MaterialRelationshipDto>> GetAllAsync(Guid branchId) |
|
|
{ |
|
|
{ |
|
|
var entities = await _repository.GetAllAsync(branchId, true); |
|
|
var entities = await _repository.GetAllAsync(branchId, true); |
|
@ -295,7 +289,6 @@ namespace Win.Sfs.SettleAccount.Entities.MaterialRelationships |
|
|
|
|
|
|
|
|
[HttpPost] |
|
|
[HttpPost] |
|
|
[Route("")] |
|
|
[Route("")] |
|
|
[Authorize(SettleAccountPermissions.MaterialRelationships.Create)] |
|
|
|
|
|
virtual public async Task<MaterialRelationshipDto> CreateAsync(MaterialRelationshipCreateDto input) |
|
|
virtual public async Task<MaterialRelationshipDto> CreateAsync(MaterialRelationshipCreateDto input) |
|
|
{ |
|
|
{ |
|
|
|
|
|
|
|
@ -341,7 +334,6 @@ namespace Win.Sfs.SettleAccount.Entities.MaterialRelationships |
|
|
/// <returns>实体DTO</returns>
|
|
|
/// <returns>实体DTO</returns>
|
|
|
[HttpPut] |
|
|
[HttpPut] |
|
|
[Route("{id}")] |
|
|
[Route("{id}")] |
|
|
[Authorize(SettleAccountPermissions.MaterialRelationships.Update)] |
|
|
|
|
|
virtual public async Task<MaterialRelationshipDto> UpdateAsync(Guid id, MaterialRelationshipUpdateDto input) |
|
|
virtual public async Task<MaterialRelationshipDto> UpdateAsync(Guid id, MaterialRelationshipUpdateDto input) |
|
|
{ |
|
|
{ |
|
|
var entity = await _repository.GetAsync(id); |
|
|
var entity = await _repository.GetAsync(id); |
|
@ -369,7 +361,6 @@ namespace Win.Sfs.SettleAccount.Entities.MaterialRelationships |
|
|
/// <returns>无</returns>
|
|
|
/// <returns>无</returns>
|
|
|
[HttpDelete] |
|
|
[HttpDelete] |
|
|
[Route("{id}")] |
|
|
[Route("{id}")] |
|
|
[Authorize(SettleAccountPermissions.MaterialRelationships.Delete)] |
|
|
|
|
|
virtual public async Task DeleteAsync(Guid id) |
|
|
virtual public async Task DeleteAsync(Guid id) |
|
|
{ |
|
|
{ |
|
|
var entity = await GetFromCacheAsync(id); |
|
|
var entity = await GetFromCacheAsync(id); |
|
@ -384,7 +375,6 @@ namespace Win.Sfs.SettleAccount.Entities.MaterialRelationships |
|
|
/// <returns>是否执行成功</returns>
|
|
|
/// <returns>是否执行成功</returns>
|
|
|
[HttpPost] |
|
|
[HttpPost] |
|
|
[Route("delete")] |
|
|
[Route("delete")] |
|
|
[Authorize(SettleAccountPermissions.MaterialRelationships.Delete)] |
|
|
|
|
|
virtual public async Task<bool> DeleteListAsync(List<Guid> ids) |
|
|
virtual public async Task<bool> DeleteListAsync(List<Guid> ids) |
|
|
{ |
|
|
{ |
|
|
var _query = _repository.Where(p => ids.Contains(p.Id)); |
|
|
var _query = _repository.Where(p => ids.Contains(p.Id)); |
|
@ -398,7 +388,6 @@ namespace Win.Sfs.SettleAccount.Entities.MaterialRelationships |
|
|
} |
|
|
} |
|
|
[HttpPost] |
|
|
[HttpPost] |
|
|
[Route("Export")] |
|
|
[Route("Export")] |
|
|
[Authorize(SettleAccountPermissions.MaterialRelationships.Default)] |
|
|
|
|
|
virtual public async Task<string> ExportAsync(MaterialRelationshipRequestDto input) |
|
|
virtual public async Task<string> ExportAsync(MaterialRelationshipRequestDto input) |
|
|
{ |
|
|
{ |
|
|
//var _userId = CurrentUser.Id.Value.ToString();
|
|
|
//var _userId = CurrentUser.Id.Value.ToString();
|
|
|