fix 统计,消费明细
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
using Dlhis.Entity.Basic.Entity;
|
||||
using Dlhis.Entity.Canteen.Entities;
|
||||
using Dlhis.Entity.Canteen.Enums;
|
||||
using Dlhis.External.EMealVoucher.Request;
|
||||
@@ -19,6 +20,9 @@ public class EMealVoucherService : IEMealVoucherService
|
||||
{
|
||||
(await _dbContext.Queryable<EMealVoucherEntity>().Where(x => x.No == request.No).AnyAsync()).ThrowIfTrue($"{request.No}已存在");
|
||||
|
||||
var gainfo = await _dbContext.Queryable<GainfoEntity>().Where(x => x.Code == request.Code).SingleAsync();
|
||||
gainfo.ThrowIfNull("申请人不存在");
|
||||
|
||||
var voucher = new EMealVoucherEntity
|
||||
{
|
||||
No = request.No,
|
||||
@@ -31,7 +35,8 @@ public class EMealVoucherService : IEMealVoucherService
|
||||
Reason = request.Reason,
|
||||
Shifts = request.Shifts.Select(x => (ShiftEnumType)x).ToList(),
|
||||
Date = request.Date,
|
||||
Factories = request.Factories
|
||||
Factories = request.Factories,
|
||||
Factory = gainfo.Factory
|
||||
};
|
||||
|
||||
var details = request.Details.Select(x => new EMealVoucherDetailEntity
|
||||
|
||||
Reference in New Issue
Block a user