fix 增加null校验
This commit is contained in:
@@ -157,6 +157,7 @@ public class AssignmentsController : ControllerBase
|
|||||||
// }
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[Obsolete]
|
||||||
[AllowAnonymous]
|
[AllowAnonymous]
|
||||||
[IgnoreTenant]
|
[IgnoreTenant]
|
||||||
[HttpPost("settlement/supplier/calc/{year:int}/{month:int}")]
|
[HttpPost("settlement/supplier/calc/{year:int}/{month:int}")]
|
||||||
@@ -224,6 +225,11 @@ public class AssignmentsController : ControllerBase
|
|||||||
await _dbContext.InsertAsync(settlementSupplierMonthlies);
|
await _dbContext.InsertAsync(settlementSupplierMonthlies);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 录入结算金额
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <exception cref="UserFriendlyException"></exception>
|
||||||
//[AllowAnonymous]
|
//[AllowAnonymous]
|
||||||
[Transactional]
|
[Transactional]
|
||||||
[IgnoreTenant]
|
[IgnoreTenant]
|
||||||
@@ -235,6 +241,8 @@ public class AssignmentsController : ControllerBase
|
|||||||
.Where(x => x.Valid)
|
.Where(x => x.Valid)
|
||||||
.FirstAsync();
|
.FirstAsync();
|
||||||
|
|
||||||
|
data.ThrowIfNull("未找到结算数据");
|
||||||
|
|
||||||
//复制data然后修改
|
//复制data然后修改
|
||||||
var newData = new SettlementSupplierMonthly
|
var newData = new SettlementSupplierMonthly
|
||||||
{
|
{
|
||||||
@@ -261,6 +269,11 @@ public class AssignmentsController : ControllerBase
|
|||||||
await _dbContext.InsertAsync(newData);
|
await _dbContext.InsertAsync(newData);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 录入退款金额
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <exception cref="UserFriendlyException"></exception>
|
||||||
//[AllowAnonymous]
|
//[AllowAnonymous]
|
||||||
[IgnoreTenant]
|
[IgnoreTenant]
|
||||||
[HttpPost("settlement/supplier/refund")]
|
[HttpPost("settlement/supplier/refund")]
|
||||||
@@ -271,6 +284,8 @@ public class AssignmentsController : ControllerBase
|
|||||||
.Where(x => x.Valid)
|
.Where(x => x.Valid)
|
||||||
.FirstAsync();
|
.FirstAsync();
|
||||||
|
|
||||||
|
data.ThrowIfNull("未找到结算数据");
|
||||||
|
|
||||||
//复制data然后修改
|
//复制data然后修改
|
||||||
var newData = new SettlementSupplierMonthly
|
var newData = new SettlementSupplierMonthly
|
||||||
{
|
{
|
||||||
@@ -297,7 +312,11 @@ public class AssignmentsController : ControllerBase
|
|||||||
await _dbContext.InsertAsync(newData);
|
await _dbContext.InsertAsync(newData);
|
||||||
}
|
}
|
||||||
|
|
||||||
[AllowAnonymous]
|
/// <summary>
|
||||||
|
/// 供应商结算报表
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <returns></returns>
|
||||||
[IgnoreTenant]
|
[IgnoreTenant]
|
||||||
[HttpGet("settlement/supplier/page")]
|
[HttpGet("settlement/supplier/page")]
|
||||||
public async Task<Pagination<SettlementSupplierPageResponse>> GetSettlementSupplierPageAsync([FromQuery] SettlementSupplierPageRequest request)
|
public async Task<Pagination<SettlementSupplierPageResponse>> GetSettlementSupplierPageAsync([FromQuery] SettlementSupplierPageRequest request)
|
||||||
@@ -323,6 +342,11 @@ public class AssignmentsController : ControllerBase
|
|||||||
return page;
|
return page;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 供应商结算管理
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="request"></param>
|
||||||
|
/// <returns></returns>
|
||||||
[IgnoreTenant]
|
[IgnoreTenant]
|
||||||
[HttpGet("settlement/supplier/originPage")]
|
[HttpGet("settlement/supplier/originPage")]
|
||||||
public async Task<Pagination<SettlementSupplierPageResponse>> GetSettlementSupplierOriginPageAsync([FromQuery] SettlementSupplierPageRequest request)
|
public async Task<Pagination<SettlementSupplierPageResponse>> GetSettlementSupplierOriginPageAsync([FromQuery] SettlementSupplierPageRequest request)
|
||||||
|
|||||||
@@ -3,14 +3,20 @@ namespace Dlhis.ScheduledTask.TaskAssignment.Response;
|
|||||||
public class SettlementSupplierPageResponse
|
public class SettlementSupplierPageResponse
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// YYYYMM
|
/// 对账日期
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string SettleMonth { get; set; }
|
public string SettleMonth { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 供应商名称
|
||||||
|
/// </summary>
|
||||||
public string SupplierName { get; set; }
|
public string SupplierName { get; set; }
|
||||||
|
|
||||||
public Guid BusinessPlaceCode { get; set; }
|
public Guid BusinessPlaceCode { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 营业点
|
||||||
|
/// </summary>
|
||||||
public string BusinessPlaceName { get; set; }
|
public string BusinessPlaceName { get; set; }
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
@@ -43,5 +49,9 @@ public class SettlementSupplierPageResponse
|
|||||||
public string TenantId { get; set; }
|
public string TenantId { get; set; }
|
||||||
|
|
||||||
public int CreatedBy { get; set; }
|
public int CreatedBy { get; set; }
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 操作人
|
||||||
|
/// </summary>
|
||||||
public string Creator { get; set; }
|
public string Creator { get; set; }
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user