|
@@ -44,6 +44,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
var groupInfo = _sqlSugar.Queryable<Grp_GroupCostParameter>().Where(x => x.IsDel == 0 && x.DiId == diId).First();
|
|
|
if (groupInfo == null) { _view.Msg = $"团组成本信息未填写!"; return _view; }
|
|
|
_teamCurrency = groupInfo.Currency;
|
|
|
+ decimal _teamRate = groupInfo.Rate;
|
|
|
//币种验证 统一为currencycode三字码
|
|
|
if (int.TryParse(_teamCurrency,out int currency)) _teamCurrency = setData.Find(x => x.Id == currency)?.Name ?? "";
|
|
|
|
|
@@ -194,16 +195,24 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
return _view;
|
|
|
}
|
|
|
//获取C表汇率
|
|
|
- decimal _rate = 1.0000M;
|
|
|
- var payInfo = _sqlSugar.Queryable<Grp_CreditCardPayment>().Where(x => x.IsDel == 0 && x.DIId == diId && x.CTable == 79 && x.Id == dataId).First();
|
|
|
+ decimal _opRate = 1.0000M;
|
|
|
+ var payInfo = _sqlSugar.Queryable<Grp_CreditCardPayment>().Where(x => x.IsDel == 0 && x.DIId == diId && x.CTable == 79 && x.CId == dataId).First();
|
|
|
if (payInfo == null)
|
|
|
{
|
|
|
_view.Msg = $"OP费用付款数据未填写";
|
|
|
return _view;
|
|
|
}
|
|
|
- _rate = payInfo.DayRate;
|
|
|
+ _opRate = payInfo.DayRate;
|
|
|
|
|
|
string opCurrencyName = setData.Find(x => x.Id == opContents[0].Currency)?.Name ?? "";
|
|
|
+
|
|
|
+ //团组、OP币种 验证是否一致
|
|
|
+ if (opCurrencyName.Equals(_teamCurrency))
|
|
|
+ {
|
|
|
+ _opRate = payInfo.DayRate;
|
|
|
+ _teamRate = payInfo.DayRate;
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
var opBasicDatas = setData.Where(x => x.STid == 17).ToList(); //费用类型基础数据
|
|
|
bool isAutoAudit = true;
|
|
@@ -255,56 +264,56 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
|
|
|
//车费 91
|
|
|
var opCarCost = item.FirstOrDefault(x => x.SId == 91);
|
|
|
- if (opCarCost != null) if (opCarCost.Price * _rate > _rate * opCostInfo.Sum(x => x.CarFee)) isAutoAudit = false;
|
|
|
+ if (opCarCost != null) if (opCarCost.Price * _opRate > _teamRate * opCostInfo.Sum(x => x.CarFee)) isAutoAudit = false;
|
|
|
//982 车超时费 -- 暂无
|
|
|
//92 导游费
|
|
|
var opGuideCost = item.FirstOrDefault(x => x.SId == 92);
|
|
|
- if (opGuideCost != null) if (opGuideCost.Price * _rate > _rate * opCostInfo.Sum(x => x.GuideFee)) isAutoAudit = false;
|
|
|
+ if (opGuideCost != null) if (opGuideCost.Price * _opRate > _teamRate * opCostInfo.Sum(x => x.GuideFee)) isAutoAudit = false;
|
|
|
//94 导游景点费
|
|
|
var opGuideScenicCost = item.FirstOrDefault(x => x.SId == 94);
|
|
|
- if (opGuideScenicCost != null) if (opGuideScenicCost.Price * _rate > _rate * opCostInfo.Sum(x => x.GuideScenicFee)) isAutoAudit = false;
|
|
|
+ if (opGuideScenicCost != null) if (opGuideScenicCost.Price * _opRate > _teamRate * opCostInfo.Sum(x => x.GuideScenicFee)) isAutoAudit = false;
|
|
|
//95 导游小费
|
|
|
var opGuideTipCost = item.FirstOrDefault(x => x.SId == 95);
|
|
|
- if (opGuideTipCost != null) if (opGuideTipCost.Price * _rate > _rate * opCostInfo.Sum(x => x.GuideTipFee)) isAutoAudit = false;
|
|
|
+ if (opGuideTipCost != null) if (opGuideTipCost.Price * _opRate > _teamRate * opCostInfo.Sum(x => x.GuideTipFee)) isAutoAudit = false;
|
|
|
//983 导游餐补
|
|
|
var opGuideMealCost = item.FirstOrDefault(x => x.SId == 983);
|
|
|
- if (opGuideMealCost != null) if (opGuideMealCost.Price * _rate > _rate * opCostInfo.Sum(x => x.GuideMealFee)) isAutoAudit = false;
|
|
|
+ if (opGuideMealCost != null) if (opGuideMealCost.Price * _opRate > _teamRate * opCostInfo.Sum(x => x.GuideMealFee)) isAutoAudit = false;
|
|
|
//984 导游房补
|
|
|
var opGuideRoomCost = item.FirstOrDefault(x => x.SId == 984);
|
|
|
- if (opGuideRoomCost != null) if (opGuideRoomCost.Price * _rate > _rate * opCostInfo.Sum(x => x.GuideRoomFee)) isAutoAudit = false;
|
|
|
+ if (opGuideRoomCost != null) if (opGuideRoomCost.Price * _opRate > _teamRate * opCostInfo.Sum(x => x.GuideRoomFee)) isAutoAudit = false;
|
|
|
//985 导游交通
|
|
|
var opGuideTrafficCost = item.FirstOrDefault(x => x.SId == 985);
|
|
|
- if (opGuideTrafficCost != null) if (opGuideTrafficCost.Price * _rate > _rate * opCostInfo.Sum(x => x.GuideTrafficFee)) isAutoAudit = false;
|
|
|
+ if (opGuideTrafficCost != null) if (opGuideTrafficCost.Price * _opRate > _teamRate * opCostInfo.Sum(x => x.GuideTrafficFee)) isAutoAudit = false;
|
|
|
//96 接送机费 -- 暂无
|
|
|
//97 其他费用 -- 暂无
|
|
|
//979 司机工资
|
|
|
var opDriverCost = item.FirstOrDefault(x => x.SId == 979);
|
|
|
- if (opDriverCost != null) if (opDriverCost.Price * _rate > _rate * opCostInfo.Sum(x => x.DriverFee)) isAutoAudit = false;
|
|
|
+ if (opDriverCost != null) if (opDriverCost.Price * _opRate > _teamRate * opCostInfo.Sum(x => x.DriverFee)) isAutoAudit = false;
|
|
|
//980 司机小费
|
|
|
var opDriverTipCost = item.FirstOrDefault(x => x.SId == 980);
|
|
|
- if (opDriverTipCost != null) if (opDriverTipCost.Price * _rate > _rate * opCostInfo.Sum(x => x.DriverTipFee)) isAutoAudit = false;
|
|
|
+ if (opDriverTipCost != null) if (opDriverTipCost.Price * _opRate > _teamRate * opCostInfo.Sum(x => x.DriverTipFee)) isAutoAudit = false;
|
|
|
//981 司机餐补
|
|
|
var opDriverMealCost = item.FirstOrDefault(x => x.SId == 981);
|
|
|
- if (opDriverMealCost != null) if (opDriverMealCost.Price * _rate > _rate * opCostInfo.Sum(x => x.DriverMealFee)) isAutoAudit = false;
|
|
|
+ if (opDriverMealCost != null) if (opDriverMealCost.Price * _opRate > _teamRate * opCostInfo.Sum(x => x.DriverMealFee)) isAutoAudit = false;
|
|
|
//988 客户早餐费用
|
|
|
var opClientBreakfastCost = item.FirstOrDefault(x => x.SId == 988);
|
|
|
- if (opClientBreakfastCost != null) if (opClientBreakfastCost.Price * _rate > _rate * opCostInfo.Sum(x => x.ClientBreakfastFee)) isAutoAudit = false;
|
|
|
+ if (opClientBreakfastCost != null) if (opClientBreakfastCost.Price * _opRate > _teamRate * opCostInfo.Sum(x => x.ClientBreakfastFee)) isAutoAudit = false;
|
|
|
//93 客户午餐费用
|
|
|
var opClientLunchCost = item.FirstOrDefault(x => x.SId == 93);
|
|
|
- if (opClientLunchCost != null) if (opClientLunchCost.Price * _rate > _rate * opCostInfo.Sum(x => x.ClientLunchFee)) isAutoAudit = false;
|
|
|
+ if (opClientLunchCost != null) if (opClientLunchCost.Price * _opRate > _teamRate * opCostInfo.Sum(x => x.ClientLunchFee)) isAutoAudit = false;
|
|
|
//989 客户晚餐费用
|
|
|
var opClientDinnerCost = item.FirstOrDefault(x => x.SId == 989);
|
|
|
- if (opClientDinnerCost != null) if (opClientDinnerCost.Price * _rate > _rate * opCostInfo.Sum(x => x.ClientDinnerFee)) isAutoAudit = false;
|
|
|
+ if (opClientDinnerCost != null) if (opClientDinnerCost.Price * _opRate > _teamRate * opCostInfo.Sum(x => x.ClientDinnerFee)) isAutoAudit = false;
|
|
|
//990 景点门票费
|
|
|
var opScenicTicketCost = item.FirstOrDefault(x => x.SId == 990);
|
|
|
- if (opScenicTicketCost != null) if (opScenicTicketCost.Price * _rate > _rate * opCostInfo.Sum(x => x.ScenicTicketFee)) isAutoAudit = false;
|
|
|
+ if (opScenicTicketCost != null) if (opScenicTicketCost.Price * _opRate > _teamRate * opCostInfo.Sum(x => x.ScenicTicketFee)) isAutoAudit = false;
|
|
|
//991 饮料/零食/水果
|
|
|
var opDrinkSnackFruitCost = item.FirstOrDefault(x => x.SId == 991);
|
|
|
- if (opDrinkSnackFruitCost != null) if (opDrinkSnackFruitCost.Price * _rate > _rate * opCostInfo.Sum(x => x.DrinkSnackFruitFee)) isAutoAudit = false;
|
|
|
+ if (opDrinkSnackFruitCost != null) if (opDrinkSnackFruitCost.Price * _opRate > _teamRate * opCostInfo.Sum(x => x.DrinkSnackFruitFee)) isAutoAudit = false;
|
|
|
//992 住补费用 -- 暂无
|
|
|
//994 翻译费
|
|
|
var opTranslatorCost = item.FirstOrDefault(x => x.SId == 994);
|
|
|
- if (opTranslatorCost != null) if (opTranslatorCost.Price * _rate > _rate * opCostInfo.Sum(x => x.TranslatorFee)) isAutoAudit = false;
|
|
|
+ if (opTranslatorCost != null) if (opTranslatorCost.Price * _opRate > _teamRate * opCostInfo.Sum(x => x.TranslatorFee)) isAutoAudit = false;
|
|
|
//1059 导游超时费用 -- 暂无
|
|
|
//1070 尾款金额 -- 暂无
|
|
|
//1071 其他额外费用 -- 暂无
|