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

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

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

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

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

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

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

Loading…
Cancel
Save