添加报销单单号生成规则

dev
douhandong 4 weeks ago
parent 8fff51dfdc
commit fc3adeab83

@ -8,8 +8,11 @@ using DS.WMS.Core.Fee.Entity;
using DS.WMS.Core.Fee.Interface;
using DS.WMS.Core.Flow.Dtos;
using DS.WMS.Core.Flow.Interface;
using DS.WMS.Core.Sys.Interface;
using DS.WMS.Core.Sys.Method;
using DS.WMS.Core.TaskInteraction.Dtos;
using DS.WMS.Core.TaskInteraction.Interface;
using DS.WMS.Core.TaskPlat.Entity;
using LanguageExt.Common;
using Mapster;
using Masuit.Tools.Database;
@ -34,12 +37,13 @@ namespace DS.WMS.Core.Fee.Method
readonly ITaskService taskService;
Lazy<ITaskService> taskService2;
Lazy<IClientFlowInstanceService> flowService;
private readonly ICommonService commonService;
/// <summary>
///
/// </summary>
/// <param name="serviceProvider"></param>
public FeeReimbursementService(IServiceProvider serviceProvider)
public FeeReimbursementService(IServiceProvider serviceProvider, ICommonService commonService)
{
_serviceProvider = serviceProvider;
saasService = _serviceProvider.GetRequiredService<ISaasDbService>();
@ -48,6 +52,7 @@ namespace DS.WMS.Core.Fee.Method
taskService = serviceProvider.GetRequiredService<ITaskService>();
taskService2 = new Lazy<ITaskService>(serviceProvider.GetRequiredService<ITaskService>());
flowService = new Lazy<IClientFlowInstanceService>(serviceProvider.GetRequiredService<IClientFlowInstanceService>());
this.commonService = commonService;
}
/// <summary>
@ -240,10 +245,9 @@ namespace DS.WMS.Core.Fee.Method
#endregion
//修改主表信息
info.ReimbursementId = "23"; //报销单编号.
DataResult<string> sequence = commonService.GetSequenceNext<FeeReimbursement>(tenantDb, user);
string No = sequence.Data ?? "";
info.ReimbursementId = No; //报销单编号.
info.CreationTime = DateTime.Now;//制单时间
info.ReimbursementType = ReimbursementTypeEnums.UnderReview;
info.Reimburser = user.UserName;
@ -252,9 +256,7 @@ namespace DS.WMS.Core.Fee.Method
//修改子表信息
foreach (var item in Pinfo)
{
item.Status = ReimbursementTypeEnums.UnderReview;
tenantDb.Updateable(item).ExecuteCommand();
}
@ -282,8 +284,6 @@ namespace DS.WMS.Core.Fee.Method
}
/// <summary>
/// 详情
/// </summary>
@ -367,12 +367,8 @@ namespace DS.WMS.Core.Fee.Method
return await Task.FromResult(DataResult.Successed(result.Message));
}
}
/// <summary>
/// 根据审批结果更新申请单状态
/// </summary>
@ -400,8 +396,6 @@ namespace DS.WMS.Core.Fee.Method
item.Status = ReimbursementTypeEnums.Approved;
tenantDb.Updateable(item).ExecuteCommand();
}
}
if (callback.FlowStatus == FlowStatusEnum.Reject)
{
@ -424,7 +418,6 @@ namespace DS.WMS.Core.Fee.Method
//return rows > 0 ? DataResult.Success : DataResult.FailedWithDesc(nameof(MultiLanguageConst.Operation_Failed));
}
/// <summary>
/// 通知审批执行人变更
/// </summary>

Loading…
Cancel
Save