|
|
@@ -9,11 +9,11 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
/// <summary>
|
|
|
/// 费用审核仓储
|
|
|
/// </summary>
|
|
|
- public class FeeAuditRepository:BaseRepository<EntityBase,ViewBase>
|
|
|
+ public class FeeAuditRepository : BaseRepository<EntityBase, ViewBase>
|
|
|
{
|
|
|
public FeeAuditRepository(SqlSugarClient sqlSugar) : base(sqlSugar)
|
|
|
- {
|
|
|
-
|
|
|
+ {
|
|
|
+
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
|
@@ -48,9 +48,9 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
var groupInfo = new Grp_GroupCostParameter();
|
|
|
string _teamCurrency = string.Empty;
|
|
|
decimal _teamRate = 1.0000M;
|
|
|
-
|
|
|
+
|
|
|
var costContents = new List<GroupCostAuditView>();
|
|
|
- var subFeeTypeIds = new int[] {
|
|
|
+ var subFeeTypeIds = new int[] {
|
|
|
4, // 保险 82
|
|
|
5, // 机票 85
|
|
|
};
|
|
|
@@ -389,6 +389,12 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
//1074 早餐超支费用 -- 暂无
|
|
|
//1075 午餐超支费用 -- 暂无
|
|
|
//1076 晚餐超支费用 -- 暂无
|
|
|
+
|
|
|
+ //1556 零用金
|
|
|
+ var opCashCost = item.FirstOrDefault(x => x.SId == 1556);
|
|
|
+ if (opCashCost != null)
|
|
|
+ if (opCashCost.Price * _opRate * _opPayPercentage > _teamRate * opCostInfo.Sum(x => x.CashFee) * _opPayPercentage) isAutoAudit = false;
|
|
|
+
|
|
|
}
|
|
|
|
|
|
//更改审核状态
|
|
|
@@ -424,7 +430,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
|
|
|
var isAutoAudit = false;
|
|
|
var currModule = 98; //其他款项
|
|
|
- int groupSize = groupDetails.VisitPNumber;
|
|
|
+ int groupSize = groupDetails.VisitPNumber;
|
|
|
|
|
|
decimal otherSubTotal = costContents.Sum(x => x.TeFee);
|
|
|
decimal groupCostCNYTotal = costContents.Sum(x => x.TeFee) * _teamRate * groupSize; //团组成本出行物资总金额
|
|
|
@@ -651,7 +657,8 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
var airInfo = await _sqlSugar.Queryable<Grp_AirTicketReservations>()
|
|
|
.InnerJoin<Grp_CreditCardPayment>((x, y) => x.Id == y.CId && y.CTable == currModule && y.IsDel == 0)
|
|
|
.Where((x, y) => x.Id == dataId && x.IsDel == 0 && auditFeeTypeIds.Contains(x.CType))
|
|
|
- .Select((x,y) => new {
|
|
|
+ .Select((x, y) => new
|
|
|
+ {
|
|
|
x.Id,
|
|
|
CcpId = y.Id,
|
|
|
x.Price,
|
|
|
@@ -862,8 +869,8 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
public string IsOverBudget(int feeType, int diId, int dataId)
|
|
|
{
|
|
|
|
|
|
- string _view ="-";
|
|
|
- if (diId < 1) { return _view; }
|
|
|
+ string _view = "-";
|
|
|
+ if (diId < 1) { return _view; }
|
|
|
if (dataId < 1) { return _view; }
|
|
|
|
|
|
List<int> stids = new() { 17, 66 };
|
|
|
@@ -879,7 +886,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
|
|
|
string costContentSql = $"Select * From Grp_GroupCost";
|
|
|
var costContents = _sqlSugar.SqlQueryable<GroupCostAuditView>(costContentSql).Where(x => x.IsDel == 0 && x.Diid == diId).ToList();
|
|
|
- if (costContents.Count < 1) { return _view; }
|
|
|
+ if (costContents.Count < 1) { return _view; }
|
|
|
|
|
|
//处理 成本详细信息 日期为空
|
|
|
for (int i = 0; i < costContents.Count; i++)
|
|
|
@@ -1076,7 +1083,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
//更改审核状态
|
|
|
if (isAutoAudit) return _view;
|
|
|
}
|
|
|
- else return _view;
|
|
|
+ else return _view;
|
|
|
|
|
|
return _view;
|
|
|
}
|