费用模板结算对象类型改为字符串

usertest
嵇文龙 3 months ago
parent e4b6cc61d6
commit 00e68b0148

@ -22,9 +22,14 @@ namespace DS.WMS.Core.Application.Method
/// 申请单基础实现
/// </summary>
/// <typeparam name="TEntity">实体的类型声明</typeparam>
public class ApplicationService<TEntity> : FeeServiceBase, IApplicationService<TEntity>
public abstract class ApplicationService<TEntity> : FeeServiceBase, IApplicationService<TEntity>
where TEntity : ApplicationForm, new()
{
/// <summary>
/// 适用于当前申请单的审核类型
/// </summary>
public abstract TaskBaseTypeEnum AuditType { get; }
readonly IClientFlowInstanceService flowService;
readonly Lazy<ICommonService> commonService;
readonly ITaskService taskService;
@ -515,15 +520,32 @@ namespace DS.WMS.Core.Application.Method
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.NotInAudit));
DataResult result;
bool hasAuthorized = await taskService.HasAuthorizedAsync();
try
{
result = await flowService.WithdrawAsync(ids);
if (!result.Succeeded)
return result;
if (hasAuthorized)
{
foreach (var item in list)
{
result = await taskService.WithdrawAsync(new TaskRequest
{
BusinessId = item.Id,
TaskTypeName = AuditType.ToString()
}, false);
foreach (var item in list)
OnWithdraw(item);
}
}
else
{
OnWithdraw(item);
result = await flowService.WithdrawAsync(ids);
if (!result.Succeeded)
return result;
foreach (var item in list)
{
OnWithdraw(item);
}
}
await TenantDb.Updateable(list).UpdateColumns(x => new { x.Status }).ExecuteCommandAsync();

@ -19,6 +19,8 @@ namespace DS.WMS.Core.Application.Method
/// </summary>
public class InvoiceApplicationService : ApplicationService<InvoiceApplication>, IInvoiceApplicationService
{
public override TaskBaseTypeEnum AuditType => TaskBaseTypeEnum.APPLICATION_INVOICE_AUDIT;
/// <summary>
/// 初始化
/// </summary>

@ -19,6 +19,8 @@ namespace DS.WMS.Core.Application.Method
/// </summary>
public class PaymentApplicationService : ApplicationService<PaymentApplication>, IPaymentApplicationService
{
public override TaskBaseTypeEnum AuditType => TaskBaseTypeEnum.APPLICATION_PAYMENT_AUDIT;
/// <summary>
/// 初始化
/// </summary>

@ -40,7 +40,7 @@ namespace DS.WMS.Core.Fee.Entity
/// 结算对象类型
/// </summary>
[SugarColumn(ColumnDescription = "结算对象类型", IsNullable = true)]
public CustomerTypeEnum? CustomerType { get; set; }
public string? CustomerType { get; set; }
/// <summary>
/// 名称

@ -41,7 +41,7 @@ namespace DS.WMS.Core.Fee.Entity
/// 结算对象类型
/// </summary>
[SugarColumn(ColumnDescription = "结算对象类型", IsNullable = true)]
public CustomerTypeEnum? CustomerType { get; set; }
public string? CustomerType { get; set; }
/// <summary>
/// 费用Id

Loading…
Cancel
Save