创建客户干系人并提交审核

dev
嵇文龙 2 months ago
parent 00c5659409
commit ace1d26afd

@ -59,5 +59,12 @@ namespace DS.WMS.Core.Info.Interface
/// <param name="stakeholder">干系人</param>
/// <returns></returns>
Task<DataResult> EditAsync(InfoClientStakeholder stakeholder);
/// <summary>
/// 创建客户干系人并提交审核
/// </summary>
/// <param name="stakeholder">干系人</param>
/// <returns></returns>
Task<DataResult> AddSubmitAsync(InfoClientStakeholder stakeholder);
}
}

@ -271,5 +271,15 @@ namespace DS.WMS.Core.Info.Method
return result;
}
/// <summary>
/// 创建客户干系人并提交审核
/// </summary>
/// <param name="stakeholder">干系人</param>
/// <returns></returns>
public async Task<DataResult> AddSubmitAsync(InfoClientStakeholder stakeholder)
{
await TenantDb.Insertable(stakeholder).ExecuteCommandAsync();
return await SubmitAuditAsync(new IdModel { Id = stakeholder.Id.ToString(), Ids = [stakeholder.Id] });
}
}
}

@ -103,6 +103,26 @@ namespace DS.WMS.MainApi.Controllers
return await _invokeService.GetAsync(id);
}
/// <summary>
/// 创建客户干系人并提交审核
/// </summary>
/// <param name="clientId">客户ID</param>
/// <returns></returns>
[HttpPost, Route("CreateSubmit")]
public async Task<DataResult> AddSubmitAsync(long clientId)
{
var date = DateTime.Now.Date;
return await _invokeService.AddSubmitAsync(new InfoClientStakeholder
{
ClientId = clientId,
CreateBy = long.Parse(_user.UserId),
CreateByName = _user.UserName,
StartDate = date,
EndDate = date.AddMonths(4),
Status = StakeholderStatus.Uncommitted
});
}
/// <summary>
/// 新增客户干系人
/// </summary>

Loading…
Cancel
Save