Commit 3f3b7e79 authored by 吴春's avatar 吴春

1

parent d60b9707
This diff is collapsed.
...@@ -3120,7 +3120,7 @@ namespace REBORN.Module.SellModule ...@@ -3120,7 +3120,7 @@ namespace REBORN.Module.SellModule
{ {
return ApiResult.Success("请选择需要导入的EXCEL!"); return ApiResult.Success("请选择需要导入的EXCEL!");
} }
var list = REBORN.Data.Guest.GuestDataHelper.ImpoertGuestData(FileName, 1); var list = REBORN.Data.Guest.GuestDataHelper.ImpoertGuestData(FileName, 1)?.Distinct()?.ToList() ?? new List<Data.Guest.ImpoertGuest>();
if (orderId > 0) if (orderId > 0)
{ {
...@@ -3203,7 +3203,7 @@ namespace REBORN.Module.SellModule ...@@ -3203,7 +3203,7 @@ namespace REBORN.Module.SellModule
return false; return false;
} }
} }
var result = list?.Select(subItem => new { Tel = subItem?.MobilePhone ?? "", IdCard = subItem?.IdCard ?? "", PassportNo = subItem?.PassportNo ?? "", PassportExpiry = StringHelper.FormatDate(subItem.PassportExpiry), PassportIssued = StringHelper.FormatDate(subItem.PassportIssued), Birthday = StringHelper.FormatDate(subItem.Birthday), userName = subItem.SurName + subItem.Name, SexStr = subItem.Sex == 1 ? "男" : subItem.Sex == 2 ? "女" : "保密", Age = subItem.Birthday.HasValue ? System.DateTime.Now.Year - subItem.Birthday.Value.Year : 0, subItem.MobilePhone }); var result = list?.Select(subItem => new { Tel = subItem?.MobilePhone ?? "", IdCard = subItem?.IdCard ?? "", Name = subItem.Name, PassportNo = subItem?.PassportNo ?? "", PassportExpiry = StringHelper.FormatDate(subItem.PassportExpiry), PassportIssued = StringHelper.FormatDate(subItem.PassportIssued), Birthday = StringHelper.FormatDate(subItem.Birthday), userName = subItem.SurName + subItem.Name, SexStr = subItem.Sex == 1 ? "男" : subItem.Sex == 2 ? "女" : "保密", Age = subItem.Birthday.HasValue ? System.DateTime.Now.Year - subItem.Birthday.Value.Year : 0, subItem.MobilePhone });
return JsonHelper.GetCamelCaseResultJson(result); return JsonHelper.GetCamelCaseResultJson(result);
} }
...@@ -3344,8 +3344,8 @@ namespace REBORN.Module.SellModule ...@@ -3344,8 +3344,8 @@ namespace REBORN.Module.SellModule
{ nameof(RB_Customer_TicketOrder_Extend.Money), demodel.Money}, { nameof(RB_Customer_TicketOrder_Extend.Money), demodel.Money},
{ nameof(RB_Customer_TicketOrder_Extend.SelffetchAddress), demodel.SelffetchAddress}, { nameof(RB_Customer_TicketOrder_Extend.SelffetchAddress), demodel.SelffetchAddress},
{ nameof(RB_Customer_TicketOrder_Extend.FinalPriceTips), demodel.FinalPriceTips}, { nameof(RB_Customer_TicketOrder_Extend.FinalPriceTips), demodel.FinalPriceTips},
{ nameof(RB_Customer_TicketOrder_Extend.UseDate), demodel.UseDate}, { nameof(RB_Customer_TicketOrder_Extend.UseDate), demodel.UseDate},
{ nameof(RB_Customer_TicketOrder_Extend.GuestInfo), demodel.GuestInfo},
}; };
List<WhereHelper> wheres = new List<WhereHelper>() { List<WhereHelper> wheres = new List<WhereHelper>() {
new WhereHelper(){ new WhereHelper(){
......
This diff is collapsed.
...@@ -768,15 +768,15 @@ namespace REBORN.Services.DMCService ...@@ -768,15 +768,15 @@ namespace REBORN.Services.DMCService
//Type=1酒店 3-邮轮 8-单机票 9-签证 10-跟团游 //Type=1酒店 3-邮轮 8-单机票 9-签证 10-跟团游
if (OrderType== "1"|| OrderType == "3"|| OrderType == "8")//酒店 if (OrderType== "1"|| OrderType == "3"|| OrderType == "8")//酒店
{ {
obj = new REBORN.Module.SellModule.CustomerOrderModule().ImpoertGuest_YL(fileUrl, Convert.ToInt32(OrderId), EmployeeId, OrderType); obj = new REBORN.Module.SellModule.CustomerOrderModule().ImpoertGuest_YL(fileUrl, 0, EmployeeId, OrderType);
} }
else if (OrderType == "9")//签证 else if (OrderType == "9")//签证
{ {
obj = new REBORN.Module.DMCModule.VisaModule().ImpoertGuest_YL(fileUrl, Convert.ToInt32(OrderId), EmployeeId); obj = new REBORN.Module.DMCModule.VisaModule().ImpoertGuest_YL(fileUrl, 0, EmployeeId);
} }
else //跟团游 else //跟团游
{ {// Convert.ToInt32(OrderId)
obj = sellOrderModule.ImpoertGuest_YL(fileUrl, Convert.ToInt32(OrderId), EmployeeId); obj = sellOrderModule.ImpoertGuest_YL(fileUrl,0, EmployeeId);
} }
} }
catch (Exception ex) catch (Exception ex)
......
...@@ -1048,6 +1048,7 @@ namespace REBORN.Services.SellService ...@@ -1048,6 +1048,7 @@ namespace REBORN.Services.SellService
Tel = jobj.GetStringValue("Tel"), Tel = jobj.GetStringValue("Tel"),
}); });
} }
orderGuestList = orderGuestList?.Distinct()?.ToList() ?? new List<OrderGuestList>();
} }
} }
catch (Exception ex) catch (Exception ex)
...@@ -2186,6 +2187,8 @@ namespace REBORN.Services.SellService ...@@ -2186,6 +2187,8 @@ namespace REBORN.Services.SellService
foreach (var jItem in guestInfoListArray) foreach (var jItem in guestInfoListArray)
{ {
JObject jobj = JObject.Parse(JsonHelper.Serialize(jItem)); JObject jobj = JObject.Parse(JsonHelper.Serialize(jItem));
string name = jobj.GetStringValue("Name");
orderGuestList.Add(new OrderGuestList orderGuestList.Add(new OrderGuestList
{ {
Birthday = jobj.GetDateTime("Birthday"), Birthday = jobj.GetDateTime("Birthday"),
...@@ -2197,6 +2200,7 @@ namespace REBORN.Services.SellService ...@@ -2197,6 +2200,7 @@ namespace REBORN.Services.SellService
Tel = jobj.GetStringValue("Tel"), Tel = jobj.GetStringValue("Tel"),
}); });
} }
orderGuestList = orderGuestList?.Distinct()?.ToList() ?? new List<OrderGuestList>();
} }
} }
catch (Exception ex) catch (Exception ex)
...@@ -2982,10 +2986,12 @@ namespace REBORN.Services.SellService ...@@ -2982,10 +2986,12 @@ namespace REBORN.Services.SellService
ResultPageModel pmodel = JsonHelper.DeserializeObject<ResultPageModel>(request.msg.ToString()); ResultPageModel pmodel = JsonHelper.DeserializeObject<ResultPageModel>(request.msg.ToString());
RB_CRMTicket_Order_Extend demodel = JsonHelper.DeserializeObject<RB_CRMTicket_Order_Extend>(request.msg.ToString()); RB_CRMTicket_Order_Extend demodel = JsonHelper.DeserializeObject<RB_CRMTicket_Order_Extend>(request.msg.ToString());
demodel.GroupId = userInfo.RB_Group_id; demodel.GroupId = userInfo.RB_Group_id;
if (demodel.IsMyOrder == 1) { if (demodel.IsMyOrder == 1)
{
demodel.EnterID = userInfo.EmployeeId; demodel.EnterID = userInfo.EmployeeId;
} }
else { else
{
demodel.OpEmpId = userInfo.EmployeeId; demodel.OpEmpId = userInfo.EmployeeId;
if (userInfo != null && userInfo.RB_Post_Id > 0) if (userInfo != null && userInfo.RB_Post_Id > 0)
{ {
...@@ -3369,6 +3375,7 @@ namespace REBORN.Services.SellService ...@@ -3369,6 +3375,7 @@ namespace REBORN.Services.SellService
orderGuestList.Add(gmodel); orderGuestList.Add(gmodel);
} }
orderGuestList = orderGuestList?.Distinct()?.ToList() ?? new List<OrderGuestList>();
} }
} }
catch (Exception ex) catch (Exception ex)
......
...@@ -6837,6 +6837,9 @@ namespace REBORN.Services.SellService ...@@ -6837,6 +6837,9 @@ namespace REBORN.Services.SellService
foreach (var jItem in guestInfoListArray) foreach (var jItem in guestInfoListArray)
{ {
JObject jobj = JObject.Parse(JsonHelper.Serialize(jItem)); JObject jobj = JObject.Parse(JsonHelper.Serialize(jItem));
string name = jobj.GetStringValue("Name");
string idCard = jobj.GetStringValue("IdCard");
orderGuestList.Add(new RB_Travel_Guest_Extend orderGuestList.Add(new RB_Travel_Guest_Extend
{ {
Birthday = jobj.GetDateTime("Birthday"), Birthday = jobj.GetDateTime("Birthday"),
...@@ -6848,6 +6851,7 @@ namespace REBORN.Services.SellService ...@@ -6848,6 +6851,7 @@ namespace REBORN.Services.SellService
Tel = jobj.GetStringValue("Tel"), Tel = jobj.GetStringValue("Tel"),
}); });
} }
//orderGuestList = orderGuestList?.Distinct()?.ToList() ?? new List<RB_Travel_Guest_Extend>();
} }
} }
catch (Exception ex) catch (Exception ex)
...@@ -10960,7 +10964,7 @@ namespace REBORN.Services.SellService ...@@ -10960,7 +10964,7 @@ namespace REBORN.Services.SellService
LeaveStr = CacheManager.User.RbUserCache.GetEmployee(x.EnterID)?.IsLeave == 1 ? "已离职" : "", LeaveStr = CacheManager.User.RbUserCache.GetEmployee(x.EnterID)?.IsLeave == 1 ? "已离职" : "",
LureEmpName = CacheManager.User.RbUserCache.GetEmployee(x.LureEmpId)?.EmName ?? "", LureEmpName = CacheManager.User.RbUserCache.GetEmployee(x.LureEmpId)?.EmName ?? "",
statsstr = x.AirConfirm == 2 ? "机票未确认" : (int)x.OrderState == 1 ? "正常" : (int)x.OrderState == 2 ? "占位" : (int)x.OrderState == 3 ? "候补" : (int)x.OrderState == 4 ? "取消" : "", statsstr = x.AirConfirm == 2 ? "机票未确认" : (int)x.OrderState == 1 ? "正常" : (int)x.OrderState == 2 ? "占位" : (int)x.OrderState == 3 ? "候补" : (int)x.OrderState == 4 ? "取消" : "",
OrderTypeName = userInfo.SimpleEasy==1? (x.PriceTeamType == 1 ? "定制团" : "外丢团") :(x.IsLeaderOrder == 1 ? "领队" : x.GroupType.GetEnumName()), OrderTypeName = userInfo.SimpleEasy == 1 ? (x.PriceTeamType == 1 ? "定制团" : "外丢团") : (x.IsLeaderOrder == 1 ? "领队" : x.GroupType.GetEnumName()),
//OrderType= CRMMergeOrderTypeEnum.Travel, //OrderType= CRMMergeOrderTypeEnum.Travel,
FinanceList = x.FinanceList.Where(z => z.Type == Common.Enum.User.WFTempLateClassEnum.IN).Select(y => new FinanceList = x.FinanceList.Where(z => z.Type == Common.Enum.User.WFTempLateClassEnum.IN).Select(y => new
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment