|
@@ -182,11 +182,16 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
List<SetDataInfoView> _TableInitialization = _mapper.Map<List<SetDataInfoView>>(TableInitialization);
|
|
|
|
|
|
List<Sys_SetData> ssd = _sqlSugar.Queryable<Sys_SetData>().Where(x => x.STid == 78).ToList();
|
|
|
- List<SetDataInfoView> ssdv = _mapper.Map<List<Sys_SetData>,List<SetDataInfoView>>(ssd);
|
|
|
+ List<SetDataInfoView> ssdv = _mapper.Map<List<Sys_SetData>, List<SetDataInfoView>>(ssd);
|
|
|
|
|
|
List<Grp_CarTouristGuideGroundReservationsContent> grp_CarTouristsContent = _sqlSugar.Queryable<Grp_CarTouristGuideGroundReservationsContent>().Where(a => a.IsDel == 0 && a.CTGGRId == dto.Id).ToList();
|
|
|
List<CarTouristGuideGroundReservationsContentView> carTouristGuides = _mapper.Map<List<CarTouristGuideGroundReservationsContentView>>(grp_CarTouristsContent);
|
|
|
|
|
|
+ TableInitialization.RemoveAll(x => x.Id == 1070 || x.Id == 1071);
|
|
|
+ var weiKuanArr = _TableInitialization.Where(x => x.Id == 1070 || x.Id == 1071).ToList();
|
|
|
+ var weiKuanResultArr = carTouristGuides.Where(x => x.SId == 1070 || x.SId == 1071).ToList();
|
|
|
+ carTouristGuides.RemoveAll(x => x.SId == 1070 || x.SId == 1071);
|
|
|
+
|
|
|
foreach (var itemSt in TableInitialization)
|
|
|
{
|
|
|
var findResult = carTouristGuides.Find(x => x.SId == itemSt.Id);
|
|
@@ -320,6 +325,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
var checkedItem = new List<string>();
|
|
|
var checkedItemId = new List<int>();
|
|
|
|
|
|
+ var isSaveCheck = false;
|
|
|
if (string.IsNullOrWhiteSpace(grpCarOp.SelectCheck))
|
|
|
{
|
|
|
//获取成本选中
|
|
@@ -354,6 +360,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
}
|
|
|
else
|
|
|
{
|
|
|
+ isSaveCheck = true;
|
|
|
var checkedItemThis = grpCarOp.SelectCheck.Split(",").ToList<string>();
|
|
|
int number = 0;
|
|
|
foreach (var item in checkedItemThis)
|
|
@@ -371,7 +378,59 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- if(dto.PortType == 1)
|
|
|
+ if (grpCarOp.PriceType == 1062) //尾款id
|
|
|
+ {
|
|
|
+ if (isSaveCheck)
|
|
|
+ {
|
|
|
+ checkedItemId.AddRange(weiKuanArr.Select(x => x.Id).ToList());
|
|
|
+ checkedItem.AddRange(weiKuanArr.Select(x => x.Name).ToList());
|
|
|
+ checkedItemId = checkedItemId.Distinct().ToList();
|
|
|
+ checkedItem = checkedItem.Distinct().ToList();
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ checkedItemId = weiKuanArr.Select(x => x.Id).ToList();
|
|
|
+ checkedItem = weiKuanArr.Select(x => x.Name).ToList();
|
|
|
+ }
|
|
|
+
|
|
|
+ var weiPrice = weiKuanResultArr.Find(x => x.SId == 1070);
|
|
|
+ if (weiPrice != null)
|
|
|
+ {
|
|
|
+ weiPrice.SidName = "尾款金额";
|
|
|
+ }
|
|
|
+ var weiOther = weiKuanResultArr.Find(x => x.SId == 1071);
|
|
|
+ if (weiOther != null)
|
|
|
+ {
|
|
|
+ weiOther.SidName = "其他额外费用";
|
|
|
+ }
|
|
|
+ carTouristGuides.Add(weiPrice ??= new CarTouristGuideGroundReservationsContentView
|
|
|
+ {
|
|
|
+ Count = 1,
|
|
|
+ DatePrice = DateTime.Now,
|
|
|
+ Price = 0,
|
|
|
+ PriceContent = "",
|
|
|
+ SId = 1070,
|
|
|
+ SidName = "尾款金额",
|
|
|
+ Units = 0,
|
|
|
+ });
|
|
|
+ carTouristGuides.Add(weiOther ??= new CarTouristGuideGroundReservationsContentView
|
|
|
+ {
|
|
|
+ Count = 1,
|
|
|
+ DatePrice = DateTime.Now,
|
|
|
+ Price = 0,
|
|
|
+ PriceContent = "",
|
|
|
+ SId = 1071,
|
|
|
+ SidName = "其他额外费用",
|
|
|
+ Units = 0,
|
|
|
+ });
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ _TableInitialization.RemoveAll(x => x.Id == 1070 || x.Id == 1071);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ if (dto.PortType == 1)
|
|
|
{
|
|
|
var data = new
|
|
|
{
|