|
@@ -165,12 +165,12 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
{
|
|
|
//1.基础数据参数验证
|
|
|
var priceType = new List<int>() { 1062 };
|
|
|
- //var opinfos = _sqlSugar.Queryable<Grp_CarTouristGuideGroundReservations>()
|
|
|
- // .Where(x => x.IsDel == 0 && x.DiId == diId && x.Id == dataId && !priceType.Contains(x.PriceType))
|
|
|
- // .First();
|
|
|
var opinfos = _sqlSugar.Queryable<Grp_CarTouristGuideGroundReservations>()
|
|
|
- .Where(x => x.IsDel == 0 && x.DiId == diId && x.Id == dataId )
|
|
|
+ .Where(x => x.IsDel == 0 && x.DiId == diId && x.Id == dataId && !priceType.Contains(x.PriceType))
|
|
|
.First();
|
|
|
+ //var opinfos = _sqlSugar.Queryable<Grp_CarTouristGuideGroundReservations>()
|
|
|
+ // .Where(x => x.IsDel == 0 && x.DiId == diId && x.Id == dataId )
|
|
|
+ // .First();
|
|
|
if (opinfos == null)
|
|
|
{
|
|
|
_view.Msg = $"OP费用费用类型属于“尾款”或者 内容未填写";
|
|
@@ -179,7 +179,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
//1.含超时费用/超支费用 手动审核
|
|
|
if (opinfos.SelectCheck.Contains("超时") || opinfos.SelectCheck.Contains("超支") || opinfos.SelectCheck.Contains("尾款"))
|
|
|
{
|
|
|
- _view.Msg = @$"OP费用含尾款超支\超时费用,请手动审核";
|
|
|
+ _view.Msg = @$"OP费用含尾款/超支/超时费用,请手动审核";
|
|
|
return _view;
|
|
|
}
|
|
|
//1.参数验证
|
|
@@ -223,9 +223,32 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
return _view;
|
|
|
}
|
|
|
|
|
|
+ var noAuditFeeTypeIds = new List<int> {
|
|
|
+ 982 ,//982 车超时费 -- 暂无
|
|
|
+ 96 ,//96 接送机费 -- 暂无
|
|
|
+ 97 ,//97 其他费用 -- 暂无
|
|
|
+ 992 ,//992 住补费用 -- 暂无
|
|
|
+ 1059,//1059 导游超时费用 -- 暂无
|
|
|
+ 1070,//1070 尾款金额 -- 暂无
|
|
|
+ 1071,//1071 其他额外费用 -- 暂无
|
|
|
+ 1073,//1073 翻译超时费 -- 暂无
|
|
|
+ 1074,//1074 早餐超支费用 -- 暂无
|
|
|
+ 1075,//1075 午餐超支费用 -- 暂无
|
|
|
+ 1076,//1076 晚餐超支费用 -- 暂无
|
|
|
+ };
|
|
|
+ //费用类型筛选 包含 feeTypeIds && 包含这些类型费用大于0
|
|
|
+ var noAuditFeeContents = opContents.Where(x => x.Price > 0 && noAuditFeeTypeIds.Contains(x.SId)).ToList();
|
|
|
+ if (noAuditFeeContents.Count > 0)
|
|
|
+ {
|
|
|
+ _view.Msg = @$"OP费用含尾款/超支/超时费用,请手动审核";
|
|
|
+ return _view;
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
//2.按天按项 检查费用是否超过预算
|
|
|
var opDayContent = opContents.GroupBy(x => x.DatePrice);
|
|
|
|
|
|
+
|
|
|
foreach (var item in opDayContent)
|
|
|
{
|
|
|
var opCostInfo = opCostDatas.Where(x => Convert.ToDateTime(x.Date) == item.Key).ToList();
|
|
@@ -234,9 +257,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
//车费 91
|
|
|
var opCarCost = item.FirstOrDefault(x => x.SId == 91);
|
|
|
if (opCarCost != null) if (opCarCost.Price > _rate * opCostInfo.Sum(x => x.CarFee)) isAutoAudit = false;
|
|
|
-
|
|
|
//982 车超时费 -- 暂无
|
|
|
-
|
|
|
//92 导游费
|
|
|
var opGuideCost = item.FirstOrDefault(x => x.SId == 92);
|
|
|
if (opGuideCost != null) if (opGuideCost.Price > _rate * opCostInfo.Sum(x => x.GuideFee)) isAutoAudit = false;
|
|
@@ -285,13 +306,13 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
//994 翻译费
|
|
|
var opTranslatorCost = item.FirstOrDefault(x => x.SId == 994);
|
|
|
if (opTranslatorCost != null) if (opTranslatorCost.Price > _rate * opCostInfo.Sum(x => x.TranslatorFee)) isAutoAudit = false;
|
|
|
- //1059 导游超时费用
|
|
|
- //1070 尾款金额
|
|
|
- //1071 其他额外费用
|
|
|
- //1073 翻译超时费
|
|
|
- //1074 早餐超支费用
|
|
|
- //1075 午餐超支费用
|
|
|
- //1076 晚餐超支费用
|
|
|
+ //1059 导游超时费用 -- 暂无
|
|
|
+ //1070 尾款金额 -- 暂无
|
|
|
+ //1071 其他额外费用 -- 暂无
|
|
|
+ //1073 翻译超时费 -- 暂无
|
|
|
+ //1074 早餐超支费用 -- 暂无
|
|
|
+ //1075 午餐超支费用 -- 暂无
|
|
|
+ //1076 晚餐超支费用 -- 暂无
|
|
|
}
|
|
|
|
|
|
//更改审核状态
|