|
@@ -10,6 +10,7 @@ using OASystem.Domain.Entities.Groups;
|
|
|
using OASystem.Domain.ViewModels.Financial;
|
|
|
using OASystem.Domain.ViewModels.Statistics;
|
|
|
using OASystem.Infrastructure.Repositories.Groups;
|
|
|
+using SqlSugar;
|
|
|
using System.Data;
|
|
|
using static OASystem.API.OAMethodLib.GeneralMethod;
|
|
|
using TypeInfo = OASystem.Domain.ViewModels.Statistics.TypeInfo;
|
|
@@ -1314,6 +1315,45 @@ ORDER BY
|
|
|
_geView.GroupRoyaltyFeeStr = string.Format(@"人民币总费用:{0} CNY", royaltyCNYTotalPrice.ToString("#0.00"));
|
|
|
#endregion
|
|
|
|
|
|
+ #region 公司内部人员报销
|
|
|
+ var reimburseDatas = await _sqlSugar
|
|
|
+ .Queryable<Fin_DailyFeePayment, Sys_Users, Sys_SetData, Sys_Company>((dfp, u, sd1, c) =>
|
|
|
+ new JoinQueryInfos(
|
|
|
+ JoinType.Left, dfp.CreateUserId == u.Id,
|
|
|
+ JoinType.Left, dfp.TransferTypeId == sd1.Id,
|
|
|
+ JoinType.Left, dfp.CompanyId == c.Id
|
|
|
+ ))
|
|
|
+ .Where((dfp, u, sd1, c) => dfp.IsDel == 0 && dfp.PriceTypeId == 1353 && dfp.GroupId == _dto.DiId)
|
|
|
+ .Select((dfp, u, sd1, c) => new GroupReimburseFeeInfoView()
|
|
|
+ {
|
|
|
+ TotalAmt = dfp.SumPrice,
|
|
|
+ //FeeItems = SqlFunc.Subqueryable<Fin_DailyFeePaymentContent>()
|
|
|
+ // .Where(x => x.DFPId == dfp.Id && x.IsDel == 0)
|
|
|
+ // .Select(x => new GroupReimburseFeeSubInfo()
|
|
|
+ // {
|
|
|
+ // PriceName = x.PriceName,
|
|
|
+ // Quantity = x.Quantity,
|
|
|
+ // Price = x.Price,
|
|
|
+ // SubTotal = x.ItemTotal,
|
|
|
+ // Remark = x.Remark
|
|
|
+ // })
|
|
|
+ // .ToList(),
|
|
|
+ AppReason = dfp.Instructions,
|
|
|
+ TransferLabel = sd1.Name,
|
|
|
+ ApplyComp = c.CompanyName,
|
|
|
+ FAudit = dfp.FAudit,
|
|
|
+ MAudit = dfp.MAudit,
|
|
|
+ PayStatusFlag = dfp.IsPay == 0 ? "未付款" : "已付款",
|
|
|
+ ApplyName = u.CnName,
|
|
|
+ ApplyTime = dfp.CreateTime
|
|
|
+
|
|
|
+ })
|
|
|
+ .ToListAsync();
|
|
|
+ var reimburseTotalPrice = reimburseDatas.Sum(x => x.TotalAmt);
|
|
|
+ _geView.GroupReimburseFeeViews = reimburseDatas;
|
|
|
+ _geView.GroupReimburseFeeStr = string.Format(@"人民币总费用:{0} CNY", reimburseTotalPrice.ToString("#0.00"));
|
|
|
+
|
|
|
+ #endregion
|
|
|
_view.GroupExpenditure = _geView;
|
|
|
#endregion
|
|
|
|
|
@@ -1332,7 +1372,7 @@ ORDER BY
|
|
|
decimal _receivableProfit = 0.00M; //应收利润
|
|
|
decimal _receivedProfit = 0.00M; //已收利润
|
|
|
_totalExpenditure = HotelCNYTotalPrice + CTGGRCNYTotalPrice + AirCNYTotalPrice + VisaCNYTotalPirce + InvitationalCNYTotalPrice +
|
|
|
- InsuranceCNYTotalPrice + DecreaseCNYTotalPrice + exTotalAmount + royaltyCNYTotalPrice;
|
|
|
+ InsuranceCNYTotalPrice + DecreaseCNYTotalPrice + exTotalAmount + royaltyCNYTotalPrice + reimburseTotalPrice;
|
|
|
_amountReceivable = frTotalAmount;
|
|
|
_amountReceived = prTotalAmount;
|
|
|
_receivableProfit = _amountReceivable - promTotalAmount - _totalExpenditure;
|