|
|
|
@ -102,12 +102,26 @@ namespace DS.WMS.Core.Invoice.Method
|
|
|
|
|
var invoice = await TenantDb.Queryable<Entity.Invoice>().Select<InvoiceDto>().FirstAsync(x => x.Id == id);
|
|
|
|
|
if (invoice != null)
|
|
|
|
|
{
|
|
|
|
|
if (!string.IsNullOrEmpty(invoice.PushMode))
|
|
|
|
|
{
|
|
|
|
|
invoice.PushModeValues = invoice.PushMode.Split(',', StringSplitOptions.RemoveEmptyEntries)
|
|
|
|
|
.Select(x => (PushMode)int.Parse(x)).ToArray();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
if (invoice.OperatorId.HasValue)
|
|
|
|
|
{
|
|
|
|
|
invoice.OperatorName = await Db.Queryable<SysUser>().Where(x => x.Id == invoice.OperatorId.Value)
|
|
|
|
|
.Select(x => x.UserName).FirstAsync();
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
invoice.Details = await CreateApplicationDetailQuery((d, f, s) => d.ApplicationId == id && d.Category == DetailCategory.InvoiceIssuance)
|
|
|
|
|
.Select(x => new ApplicationDetailDto
|
|
|
|
|
{
|
|
|
|
|
Id = x.Id,
|
|
|
|
|
ApplicationId = x.ApplicationId,
|
|
|
|
|
RecordId = x.RecordId,
|
|
|
|
|
DetailId = x.DetailId,
|
|
|
|
|
RefId = x.RefId,
|
|
|
|
|
FeeName = x.FeeName,
|
|
|
|
|
FeeType = x.FeeType,
|
|
|
|
|
ApplyAmount = x.ApplyAmount,
|
|
|
|
@ -203,6 +217,9 @@ namespace DS.WMS.Core.Invoice.Method
|
|
|
|
|
|
|
|
|
|
invoice.OperatorId ??= long.Parse(User.UserId);
|
|
|
|
|
|
|
|
|
|
if (invoice.PushModeValues.Length > 0)
|
|
|
|
|
invoice.PushMode = string.Join(",", invoice.PushModeValues.Select(x => (int)x));
|
|
|
|
|
|
|
|
|
|
if (request.Invoice.Mode == InvoiceMode.Applcation && request.Applications != null && request.Applications.Count > 0) //发票申请开出
|
|
|
|
|
{
|
|
|
|
|
var ids = request.Applications.Select(x => x.ApplicationId);
|
|
|
|
|