整单审核费用状态

dev
嵇文龙 3 weeks ago
parent d55ac8bf85
commit 4019f8ca89

@ -170,22 +170,40 @@ namespace DS.Module.Core
Pending = 0,
/// <summary>
/// 提交审核
/// 应收待确认
/// </summary>
[Description("提交审核")]
AuditSubmitted = 1,
[Description("应收待确认")]
RecvSubmitted = 1,
/// <summary>
/// 审核通过
/// 应收审核通过
/// </summary>
[Description("审核通过")]
AuditPassed = 2,
[Description("应收审核通过")]
RecvPassed = 2,
/// <summary>
/// 驳回提交
/// 应收审核驳回
/// </summary>
[Description("驳回提交")]
Rejected = 3
[Description("应收审核驳回")]
RecvRejected = -1,
/// <summary>
/// 应付待确认
/// </summary>
[Description("应付待确认")]
PaySubmitted = 3,
/// <summary>
/// 应付审核通过
/// </summary>
[Description("应付审核通过")]
PayPassed = 4,
/// <summary>
/// 应付审核驳回
/// </summary>
[Description("应付审核驳回")]
PayRejected = -2,
}
/// <summary>

@ -42,8 +42,6 @@
<Folder Include="Op\Interface\TaskInteraction\" />
<Folder Include="Op\Interface\新文件夹\" />
<Folder Include="Op\Method\TaskInteraction\" />
<Folder Include="TaskPlat\Interface\VGM\" />
<Folder Include="TaskPlat\Interface\PODDischargeGateoutFull\" />
</ItemGroup>
<ItemGroup>

@ -707,7 +707,7 @@ namespace DS.WMS.Core.Fee.Method
if (bizList.Count == 0)
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.EmptyData));
if (bizList.Any(x => x.BillAuditStatus != BillAuditStatus.AuditSubmitted))
if (bizList.Any(x => x.BillAuditStatus != BillAuditStatus.RecvSubmitted && x.BillAuditStatus != BillAuditStatus.PaySubmitted))
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.BusinessAuditStatusError));
if (hasAuthorized)
@ -904,32 +904,32 @@ namespace DS.WMS.Core.Fee.Method
}
break;
case TaskBaseTypeEnum.FEE_BUSINESS_AUDIT:
FeeStatus status = FeeStatus.RejectSubmission;
if (callback.FlowStatus == FlowStatusEnum.Approve)
{
biz.BillAuditStatus = BillAuditStatus.AuditPassed;
status = FeeStatus.AuditPassed;
}
else if (callback.FlowStatus == FlowStatusEnum.Reject)
{
biz.BillAuditStatus = BillAuditStatus.Rejected;
}
await TenantDb.Updateable(biz).UpdateColumns(x => new
{
x.BillAuditStatus
}).ExecuteCommandAsync();
await TenantDb.Updateable<FeeRecord>()
.SetColumns(x => x.FeeStatus == status)
.SetColumns(x => x.AuditBy == UserId)
.SetColumns(x => x.AuditOperator == User.UserName)
.SetColumns(x => x.AuditDate == dtNow)
.Where(x => x.BusinessId == biz.BusinessId && x.BusinessType == biz.BusinessType &&
x.FeeStatus != FeeStatus.PartialSettlement && x.FeeStatus != FeeStatus.SettlementCompleted).ExecuteCommandAsync();
break;
//case TaskBaseTypeEnum.FEE_BUSINESS_AUDIT:
// FeeStatus status = FeeStatus.RejectSubmission;
// if (callback.FlowStatus == FlowStatusEnum.Approve)
// {
// biz.BillAuditStatus = BillAuditStatus.AuditPassed;
// status = FeeStatus.AuditPassed;
// }
// else if (callback.FlowStatus == FlowStatusEnum.Reject)
// {
// biz.BillAuditStatus = BillAuditStatus.Rejected;
// }
// await TenantDb.Updateable(biz).UpdateColumns(x => new
// {
// x.BillAuditStatus
// }).ExecuteCommandAsync();
// await TenantDb.Updateable<FeeRecord>()
// .SetColumns(x => x.FeeStatus == status)
// .SetColumns(x => x.AuditBy == UserId)
// .SetColumns(x => x.AuditOperator == User.UserName)
// .SetColumns(x => x.AuditDate == dtNow)
// .Where(x => x.BusinessId == biz.BusinessId && x.BusinessType == biz.BusinessType &&
// x.FeeStatus != FeeStatus.PartialSettlement && x.FeeStatus != FeeStatus.SettlementCompleted).ExecuteCommandAsync();
// break;
}
////驳回申请则逻辑删除关联工作流

@ -29,7 +29,7 @@ namespace DS.WMS.Core.Fee.Method
readonly IClientFlowInstanceService flowService;
readonly IFeeTaskService feeTaskService;
readonly ISeaExportTaskService taskService;
readonly IFeeBillTaskService billService;
/// <summary>
/// 初始化
@ -39,7 +39,7 @@ namespace DS.WMS.Core.Fee.Method
{
flowService = serviceProvider.GetRequiredService<IClientFlowInstanceService>();
feeTaskService = serviceProvider.GetRequiredService<IFeeTaskService>();
taskService = serviceProvider.GetRequiredService<ISeaExportTaskService>();
billService = serviceProvider.GetRequiredService<IFeeBillTaskService>();
}
/// <summary>
@ -893,7 +893,7 @@ namespace DS.WMS.Core.Fee.Method
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.BusinessNotFound));
if (entity.IsFeeLocking.GetValueOrDefault())
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.FeeLocked));
if (entity.BillAuditStatus == BillAuditStatus.AuditSubmitted || entity.BillAuditStatus == BillAuditStatus.AuditPassed)
if (entity.BillAuditStatus == BillAuditStatus.PayPassed || entity.BillAuditStatus == BillAuditStatus.PaySubmitted || entity.BillAuditStatus == BillAuditStatus.RecvSubmitted)
return DataResult.Failed(string.Format(MultiLanguageConst.BusinessStatusError, entity.BillAuditStatus.GetDescription()));
if (await flowService.IsRunning(BIZ_TASK_TYPE, type, bid))
@ -903,7 +903,7 @@ namespace DS.WMS.Core.Fee.Method
await TenantDb.Ado.BeginTranAsync();
try
{
if (await taskService.HasAuthorizedAsync())
if (await billService.HasAuthorizedAsync())
{
string? bizNo = null;
switch (type)
@ -917,7 +917,7 @@ namespace DS.WMS.Core.Fee.Method
break;
}
result = await taskService.CreateTaskAsync(new TaskCreationRequest
result = await billService.CreateTaskAsync(new TaskCreationRequest
{
BusinessId = bid,
BusinessType = type,
@ -946,7 +946,7 @@ namespace DS.WMS.Core.Fee.Method
return result;
//变更状态为提交审核
entity.BillAuditStatus = BillAuditStatus.AuditSubmitted;
entity.BillAuditStatus = BillAuditStatus.RecvSubmitted;
entity.BillFeeStatusTime = DateTime.Now;
await TenantDb.Updateable(entity).UpdateColumns(x => new
@ -992,13 +992,13 @@ namespace DS.WMS.Core.Fee.Method
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.BusinessNotFound));
if (entity.IsFeeLocking.GetValueOrDefault())
return DataResult.FailedWithDesc(nameof(MultiLanguageConst.FeeLocked));
if (entity.BillAuditStatus != BillAuditStatus.AuditSubmitted)
if (entity.BillAuditStatus != BillAuditStatus.RecvSubmitted && entity.BillAuditStatus != BillAuditStatus.PaySubmitted)
return DataResult.Failed(string.Format(MultiLanguageConst.BusinessStatusError, entity.BillAuditStatus.GetDescription()));
DataResult result = DataResult.Success;
if (await taskService.HasAuthorizedAsync())
if (await billService.HasAuthorizedAsync())
{
await taskService.WithdrawAsync(new TaskRequest
await billService.WithdrawAsync(new TaskRequest
{
BusinessId = bid,
BusinessType = type,

@ -1531,7 +1531,7 @@ public class SeaExportRes
/// <summary>
/// 整票审核状态
/// </summary>
public BillAuditStatus AuditStatus { get; set; }
public BillAuditStatus? AuditStatus { get; set; }
/// <summary>
/// 货好时间-(只要年月日)

@ -71,14 +71,14 @@ namespace DS.WMS.Core.Op.Entity
/// <summary>
/// 整单费用审核状态
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "整单费用审核状态", IsNullable = true, DefaultValue = "0")]
public BillAuditStatus BillAuditStatus { get; set; } = 0;
[SugarColumn(ColumnDescription = "整单费用审核状态", IsNullable = true, DefaultValue = "0")]
public BillAuditStatus? BillAuditStatus { get; set; }
/// <summary>
/// 整单费用状态时间
/// </summary>
[SqlSugar.SugarColumn(ColumnDescription = "整单费用状态时间", IsNullable = true)]
public DateTime BillFeeStatusTime { get; set; }
[SugarColumn(ColumnDescription = "整单费用状态时间", IsNullable = true)]
public DateTime? BillFeeStatusTime { get; set; }
//[SugarColumn(ColumnDescription = "当前审批工作流ID", IsNullable = true)]
//public long? FlowId { get; set; }
@ -167,7 +167,6 @@ namespace DS.WMS.Core.Op.Entity
ARCheckStatus = BillCheckStatusEnum.NotChecked,
IsBusinessLocking = false,
IsFeeLocking = false,
BillAuditStatus = BillAuditStatus.Pending,
//BillFeeStatusTime = null,
};
}

@ -0,0 +1,10 @@
namespace DS.WMS.Core.TaskInteraction.Interface
{
/// <summary>
/// 费用整票审核任务
/// </summary>
public interface IFeeBillTaskService : IAuditTaskService
{
}
}

@ -0,0 +1,20 @@
using DS.WMS.Core.TaskInteraction.Interface;
namespace DS.WMS.Core.TaskInteraction.Method
{
/// <summary>
/// 费用整票审核任务
/// </summary>
public class FeeBillTaskService : TaskService, IFeeBillTaskService
{
/// <summary>
/// 初始化
/// </summary>
/// <param name="provider"></param>
public FeeBillTaskService(IServiceProvider provider) : base(provider)
{
}
}
}
Loading…
Cancel
Save