Commit e121be70 authored by 吴春's avatar 吴春

供应商账户和单项旅客信息修改

parent 35ee652f
......@@ -1543,5 +1543,18 @@ namespace REBORN.Common
return noShowHotelList;
}
}
/// <summary>
/// 旅客意见调查表H5的网址
/// </summary>
public static string SurveyH5URL
{
get
{
string surveyURL = ConfigurationManager.AppSettings["SurveyH5URL"] ?? "";
return surveyURL;
}
}
}
}
\ No newline at end of file
......@@ -335,7 +335,7 @@ namespace REBORN.Common.Enum
[EnumField("自订")]
SelfBook = 0,
/// <summary>
/// <summary>0
/// 供应商提供
/// </summary>
[EnumField("供应商提供")]
......
using System;
using REBORN.Common.AOP;
using REBORN.Common.Plugin;
namespace REBORN.Model.Entity
{
/// <summary>
/// 供应商类型实体
/// </summary>
[Serializable]
[DB(ConnectionName = "DMCConnection")]
public class RB_Supplier_Type
{
/// <summary>
/// 主键
/// </summary>
public int ID
{
get;
set;
}
/// <summary>
/// 供应商id
/// </summary>
public int SupplierId
{
get;
set;
}
/// <summary>
/// 集团id
/// </summary>
public int? RB_Group_Id
{
get;
set;
}
/// <summary>
/// 状态
/// </summary>
public REBORN.Common.Enum.DateStateEnum Status
{
get;
set;
}
/// <summary>
/// 类型
/// </summary>
public REBORN.Common.Enum.Finance.ClientTypeEnum? Type
{
get;
set;
}
}
}
......@@ -556,7 +556,7 @@ namespace REBORN.Model.Entity.Dmc
public int? VisaUpdateBy { get; set; }
/// <summary>
/// 是否单办签证 1是 2否
/// 是否单办签证 1是(签证订单) 2否(跟团订单),3-酒店订单,4-邮轮(景点)订单,5-单机票订单
/// </summary>
public int? IsAllograph { get; set; }
......@@ -584,7 +584,7 @@ namespace REBORN.Model.Entity.Dmc
/// </summary>
public int? Sort { get; set; }
private int? isChargeLossGuest=0;
private int? isChargeLossGuest = 0;
/// <summary>
/// 是否是收损旅客
......
......@@ -133,7 +133,7 @@ namespace REBORN.Model.Extend.Dmc
/// <summary>
/// 旅客信息
/// </summary>
public List<OrderGuestList> OrderGuestList { get; set; }
public List<RB_Travel_Guest_Extend> OrderGuestList { get; set; }
/// <summary>
/// 其它合同【单项、境内、一日游】
......
......@@ -116,7 +116,7 @@ namespace REBORN.Model.Extend.Dmc
/// <summary>
/// 旅客信息
/// </summary>
public List<OrderGuestList> OrderGuestList { get; set; }
public List<RB_Travel_Guest_Extend> OrderGuestList { get; set; }
/// <summary>
/// 供应商
......
......@@ -76,5 +76,14 @@ namespace REBORN.Model.Extend.Dmc
get;
set;
}
/// <summary>
/// 类型
/// </summary>
public List<int> TypeList { get; set; }
/// <summary>
/// 银行账户信息
/// </summary>
public List<Finance.RB_ClientBankAccount_Extend> ClientBankAccountList { get; set; }
}
}
......@@ -164,7 +164,7 @@ namespace REBORN.Model.Extend.Sell
/// <summary>
/// 旅客信息
/// </summary>
public List<OrderGuestList> OrderGuestList { get; set; }
public List<RB_Travel_Guest_Extend> OrderGuestList { get; set; }
/// <summary>
/// 供应商
......
......@@ -188,6 +188,7 @@
<Compile Include="Entity\Dmc\RB_Scenic_Recomment.cs" />
<Compile Include="Entity\Dmc\RB_OP_GNCommission_Details.cs" />
<Compile Include="Entity\Dmc\RB_OP_GNCommission_Periods.cs" />
<Compile Include="Entity\Dmc\RB_Supplier_Type.cs" />
<Compile Include="Entity\Dmc\RB_Supplier_Man.cs" />
<Compile Include="Entity\Dmc\RB_Travel_BusSurvey.cs" />
<Compile Include="Entity\Dmc\RB_Travel_BusSurveyDetails.cs" />
......
......@@ -7,6 +7,7 @@ using REBORN.Model.Extend;
using REBORN.Model.Extend.Dmc;
using REBORN.Repository;
using REBORN.Repository.Dmc;
using REBORN.Repository.Finance;
using REBORN.ThirdCore.Oss;
using System;
using System.Collections.Generic;
......@@ -25,11 +26,18 @@ namespace REBORN.Module.DMCModule
/// 供应商仓储对象
/// </summary>
private Rb_supplierRepository respository = new Rb_supplierRepository();
/// <summary>
/// 供应商类型仓储对象
/// </summary>
private Rb_Supplier_TypeRepository supplier_TypeRepository = new Rb_Supplier_TypeRepository();
/// <summary>
/// 供应商酒店付款方式配置仓储层对象
/// </summary>
private readonly RB_Supplier_DetailRepository supplier_DetailRepository = new RB_Supplier_DetailRepository();
private readonly RB_ClientBankAccountRepository clientBankAccountRepository = new RB_ClientBankAccountRepository();
/// <summary>
/// 供应商司机仓储层
......@@ -57,7 +65,29 @@ namespace REBORN.Module.DMCModule
{
departmentIds = new Rb_departmentRepository().getDepartmentChildList(model.RB_Department_Id.Value);
}
return respository.GetPageList(pageIndex, pageSize, model, out count, departmentIds);
var list = respository.GetPageList(pageIndex, pageSize, model, out count, departmentIds);
List<RB_Supplier_Type> supplierTypeList = new List<RB_Supplier_Type>();
if (list != null && list.Any())
{
string ids = string.Join(",", list.Select(x => x.ID));
supplierTypeList = supplier_TypeRepository.GetSupplierTypeListRepository(ids, model.RB_Group_id ?? 0);
foreach (var item in list)
{
item.TypeList = supplierTypeList?.Where(x => x.SupplierId == item.ID)?.Select(x => (int)x.Type)?.Distinct()?.ToList() ?? new List<int>();
}
}
return list;
}
/// <summary>
/// 获取所有的供应商
/// </summary>
/// <param name="where"></param>
/// <returns></returns>
public List<RB_Supplier_Type> GetSupplierTypeListModule(string ids, int RB_Group_Id)
{
return supplier_TypeRepository.GetSupplierTypeListRepository(ids, RB_Group_Id);
}
/// <summary>
......@@ -65,9 +95,19 @@ namespace REBORN.Module.DMCModule
/// </summary>
/// <param name="where"></param>
/// <returns></returns>
public List<RB_Supplier> GetSupplierListModule(RB_Supplier where)
public List<RB_Supplier_Extend> GetSupplierListModule(RB_Supplier_Extend where)
{
return respository.GetSupplierListRepository(where);
var list = respository.GetSupplierListRepository(where);
if (list != null && list.Any())
{
string ids = string.Join(",", list.Select(x => x.ID));
var clientBankAccountList = clientBankAccountRepository.GetEmpBankAccountListByObjIDs(ids, 0, 0, "", "", "", where.RB_Group_id ?? 0, -1, (int)Common.Enum.Finance.ClientTypeEnum.HotelSupplier, "", "", 0);
foreach (var item in list)
{
item.ClientBankAccountList = clientBankAccountList?.Where(x => x.ObjID == item.ID)?.ToList() ?? new List<Model.Extend.Finance.RB_ClientBankAccount_Extend>();
}
}
return list;
}
......@@ -143,7 +183,7 @@ namespace REBORN.Module.DMCModule
/// </summary>
/// <param name="model"></param>
/// <returns></returns>
public bool Set(RB_Supplier model, out int id)
public bool Set(RB_Supplier_Extend model, out int id, int Type = 0)
{
bool flag = false;
id = 0;
......@@ -194,6 +234,66 @@ namespace REBORN.Module.DMCModule
flag = true;
}
}
if (flag)//新增供应商类型
{
// 获取现有的供应商类型列表
var oldList = supplier_TypeRepository.GetSupplierTypeListRepository(id.ToString(), model.RB_Group_id ?? 0);
if (oldList != null && oldList.Any())
{
if (Type == 1)
{
// 处理需要删除的记录(在oldList中存在但在model.TypeList中不存在)
var toDelete = oldList.Where(oldItem =>
!model.TypeList.Any(newItem => newItem == (int)oldItem.Type)).ToList();
foreach (var deleteItem in toDelete)
{
IDictionary<string, object> fileds = new Dictionary<string, object>()
{
{ nameof(RB_Supplier_Type.Status),(int)REBORN.Common.Enum.DateStateEnum.Delete},
};
IList<WhereHelper> whereHelpers = new List<WhereHelper>()
{
new WhereHelper (){ FiledName=nameof(RB_Supplier_Type.ID),FiledValue=deleteItem.ID,OperatorEnum=OperatorEnum.Equal}
};
flag = supplier_TypeRepository.Update(fileds, whereHelpers);
}
}
// 处理需要更新和新增的记录
foreach (var newItem in model.TypeList)
{
var existingItem = oldList.FirstOrDefault(oldItem => (int)oldItem.Type == newItem);
if ((existingItem?.ID ?? 0) == 0)
{
RB_Supplier_Type supplierTypeModel = new RB_Supplier_Type
{
SupplierId = id,
RB_Group_Id = model.RB_Group_id,
Status = REBORN.Common.Enum.DateStateEnum.Normal,
Type = (REBORN.Common.Enum.Finance.ClientTypeEnum)newItem,
};
supplier_TypeRepository.Insert(supplierTypeModel);
}
}
}
else
{
// 如果oldList为空,则全部新增
foreach (var newItem in model.TypeList)
{
RB_Supplier_Type supplierTypeModel = new RB_Supplier_Type
{
SupplierId = id,
RB_Group_Id = model.RB_Group_id,
Status = REBORN.Common.Enum.DateStateEnum.Normal,
Type = (REBORN.Common.Enum.Finance.ClientTypeEnum)newItem,
};
supplier_TypeRepository.Insert(supplierTypeModel);
}
}
}
return flag;
}
......
......@@ -6957,7 +6957,7 @@ namespace REBORN.Module.DMCModule
/// </summary>
/// <param name="where"></param>
/// <returns></returns>
public List<RB_Supplier> GetSupplierListModule(RB_Supplier where)
public List<RB_Supplier_Extend> GetSupplierListModule(RB_Supplier_Extend where)
{
return rb_supplierRepository.GetSupplierListRepository(where);
}
......
This diff is collapsed.
......@@ -17019,12 +17019,24 @@ namespace REBORN.Module.SellModule
}
if (orderModel != null)
{
var AccountTypeModel = accountTypeRepository.GetList(new Model.Extend.Finance.RB_AccountType_Extend() { RB_Group_Id = orderModel.RB_Group_Id, Name = "平台账户" }).FirstOrDefault();
var AccountTypeModel = accountTypeRepository.GetList(new Model.Extend.Finance.RB_AccountType_Extend() { RB_Group_Id = orderModel.RB_Group_Id, Name = "平台账户" })?.FirstOrDefault() ?? new Model.Extend.Finance.RB_AccountType_Extend();
orderModel.PlatformAccountTypeId = AccountTypeModel?.ID ?? 0;
}
return orderModel;
}
/// <summary>
/// 获取订单实体
/// </summary>
/// <param name="orderId"></param>
/// <returns></returns>
public RB_Travel_Order GetOrderEntityByOrderId(int orderId)
{
var orderModel = orderRepository.GetEntity(orderId);
return orderModel;
}
/// <summary>
/// 团控订单行程不同信息扩展
/// </summary>
......@@ -980,9 +980,9 @@ namespace REBORN.Module.UserModule
/// <param name="QEndCreateDate"></param>
/// <param name="QStartCreateDate"></param>
/// <returns></returns>
public List<Model.Extend.Finance.RB_ClientBankAccount_Extend> GetEmpBankAccountPageList(int pageIndex, int pageSize, out long count, int empId, int bankId, string accountHolder, string accountAlias, string keyWord, int RB_Group_id, int BranchId, int Type, string QStartCreateDate, string QEndCreateDate, int AccountClassify = -1, int CreateBy = 0)
public List<Model.Extend.Finance.RB_ClientBankAccount_Extend> GetEmpBankAccountPageList(int pageIndex, int pageSize, out long count, int empId, int bankId, string accountHolder, string accountAlias, string keyWord, int RB_Group_id, int BranchId, int Type, string QStartCreateDate, string QEndCreateDate, int AccountClassify = -1, int CreateBy = 0,int sourcePage=0)
{
var list = clientBankAccountRepository.GetEmpBankAccountPageList(pageIndex, pageSize, out count, empId, bankId, accountHolder, accountAlias, keyWord, RB_Group_id, BranchId, Type, QStartCreateDate, QEndCreateDate, AccountClassify, CreateBy);
var list = clientBankAccountRepository.GetEmpBankAccountPageList(pageIndex, pageSize, out count, empId, bankId, accountHolder, accountAlias, keyWord, RB_Group_id, BranchId, Type, QStartCreateDate, QEndCreateDate, AccountClassify, CreateBy, sourcePage);
if (list != null && list.Any())
{
string ClientIDs = string.Join(",", list.Where(x => x.ObjID > 0).Select(x => x.ObjID).Distinct());
......
using Dapper;
using REBORN.Model.Entity;
using REBORN.Model.Extend.Dmc;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace REBORN.Repository.Dmc
{
/// <summary>
/// 供应商仓储类
/// </summary>
public partial class Rb_Supplier_TypeRepository : RepositoryBase<RB_Supplier_Type>
{
/// <summary>
/// 表名称
/// </summary>
public string TableName { get { return nameof(RB_Supplier_Type); } }
/// <summary>
/// 获取所有的供应商
/// </summary>
/// <param name="where"></param>
/// <returns></returns>
public List<RB_Supplier_Type> GetSupplierTypeListRepository(string ids, int RB_Group_Id)
{
DynamicParameters parameters = new DynamicParameters();
StringBuilder sb = new StringBuilder();
sb.AppendFormat(" SELECT * FROM RB_Supplier_Type WHERE 1=1 ");
sb.AppendFormat(" AND " + nameof(RB_Supplier_Type.Status) + "={0}", (int)Common.Enum.DateStateEnum.Normal);
if (RB_Group_Id > 0)
{
sb.AppendFormat(" AND " + nameof(RB_Supplier_Type.RB_Group_Id) + "={0}", RB_Group_Id);
}
if (!string.IsNullOrWhiteSpace(ids))
{
sb.AppendFormat(" AND " + nameof(RB_Supplier_Type.SupplierId) + " in({0})", ids);
}
sb.Append(" ORDER BY ID DESC ");
return Get<RB_Supplier_Type>(sb.ToString(), parameters).ToList();
}
}
}
......@@ -38,7 +38,7 @@ namespace REBORN.Repository.Dmc
}
string selectFiled = "";
string typeWhere = "";//2025-08-27 add by:W
switch (hmodel.Type)
{
case Common.Enum.ResourceTypeEnum.Hotel:
......@@ -77,17 +77,20 @@ SELECT SupplierId AS Supplier,count(1) AS Number FROM rb_bus WHERE Status=0 AN
break;
}
if (hmodel.Type > 0)
{
typeWhere = " LEFT JOIN rb_supplier_type as st on a.ID=st.SupplierId ";
}
sb.AppendFormat(@"SELECT A.* {0}
FROM {1} AS A {2}
WHERE 1=1 ", selectFiled, TableName, joinTable);
FROM {1} AS A {2} {3}
WHERE 1=1 ", selectFiled, TableName, joinTable, typeWhere);
sb.AppendFormat(" AND A.{0}={1}", nameof(RB_Supplier_Extend.Status), (int)Common.Enum.DateStateEnum.Normal);
sb.AppendFormat(" AND A.{0}={1}", nameof(RB_Supplier_Extend.RB_Group_id), hmodel.RB_Group_id.Value);
if (hmodel.Type > 0)
{
sb.AppendFormat(" AND A.{0}={1}", nameof(RB_Supplier_Extend.Type), (int)hmodel.Type);
sb.AppendFormat(" AND st.{0}={1}", nameof(RB_Supplier_Type.Type), (int)hmodel.Type);
}
if (hmodel.Name != null && !string.IsNullOrWhiteSpace(hmodel.Name.Trim()))
{
......@@ -133,7 +136,7 @@ SELECT SupplierId AS Supplier,count(1) AS Number FROM rb_bus WHERE Status=0 AN
/// </summary>
/// <param name="where"></param>
/// <returns></returns>
public List<RB_Supplier> GetSupplierListRepository(RB_Supplier where)
public List<RB_Supplier_Extend> GetSupplierListRepository(RB_Supplier_Extend where)
{
DynamicParameters parameters = new DynamicParameters();
StringBuilder sb = new StringBuilder();
......@@ -157,7 +160,7 @@ SELECT SupplierId AS Supplier,count(1) AS Number FROM rb_bus WHERE Status=0 AN
}
}
sb.Append(" ORDER BY ID DESC ");
return Get<RB_Supplier>(sb.ToString(), parameters).ToList();
return Get<RB_Supplier_Extend>(sb.ToString(), parameters).ToList();
}
/// <summary>
......
......@@ -159,6 +159,7 @@
<Compile Include="Dmc\RB_OP_Commission_BonusDetailsRepository.cs" />
<Compile Include="Dmc\RB_Spider_FlightDetailsRepository.cs" />
<Compile Include="Dmc\RB_Spider_FlightRepository.cs" />
<Compile Include="Dmc\Rb_Supplier_TypeRepository.cs" />
<Compile Include="Dmc\RB_Travel_InvoiceOrderRepository.cs" />
<Compile Include="Dmc\RB_Travel_OrderLessRepository.cs" />
<Compile Include="Dmc\RB_B2BSale_YearBonusRepository.cs" />
......
......@@ -10,7 +10,9 @@ using REBORN.Model.Extend.Edu;
using REBORN.Module.DMCModule;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
using System.Web.UI.WebControls.WebParts;
namespace REBORN.Services.DMCService
{
......@@ -39,7 +41,7 @@ namespace REBORN.Services.DMCService
model.RB_Group_id = userInfo.RB_Group_id;
model.RB_Department_Id = userInfo.RB_Department_Id;
var data = suppliermodule.GetPageList(pmodel.pageIndex, pmodel.pageSize, model, out long count);
var list = data.Select(x => new { x.ID, x.Name, x.Tel, x.Number, x.Contact, x.IsHaveShouPeiFee, x.ShouPeiMoney, x.Type }).ToList();
var list = data.Select(x => new { x.ID, x.Name, x.Tel, x.Number, x.Contact, x.IsHaveShouPeiFee, x.ShouPeiMoney, x.Type, x.TypeList }).ToList();
pmodel.count = int.Parse(count.ToString());
pmodel.pageData = list;
return ApiResult.Success("", pmodel);
......@@ -54,15 +56,31 @@ namespace REBORN.Services.DMCService
{
JObject parm = JObject.Parse(request.msg.ToString());
UserInfo userInfo = CacheManager.User.RbUserCache.GetUserLoginInfo(request.uid);
RB_Supplier query = new RB_Supplier
RB_Supplier_Extend query = new RB_Supplier_Extend
{
Type = (ResourceTypeEnum)parm.GetInt("Type"),
// Type = (ResourceTypeEnum)parm.GetInt("Type"),
Country = parm.GetInt("Country"),
RB_Group_id = userInfo.RB_Group_id,
Name = parm.GetStringValue("Name"),
};
var List = suppliermodule.GetSupplierListModule(query).Select(item => new { item.ID, Name = item?.Name ?? "", Contact = item?.Contact ?? "", Tel = item?.Tel ?? "", CompanyName = item?.CompanyName ?? "", DutyParagraph = item?.DutyParagraph ?? "", CompanyPhone = item?.CompanyPhone ?? "", OpeningBank = item?.OpeningBank ?? "", BankNo = item?.BankNo ?? "", item.IsHaveShouPeiFee, item.ShouPeiMoney });
//string bankName = parms.GetStringValue("BankName");//所属机构
//int accountClassify = parms.GetInt("AccountClassify");//账户分类
//string cardNum = parms.GetStringValue("CardNum");//卡号
//string openBankName = parms.GetStringValue("OpenBankName");//开户行
//string accountHolder = parms.GetStringValue("AccountHolder");//开户人
var List = suppliermodule.GetSupplierListModule(query).Select(item => new {
ClientBankAccountList=item.ClientBankAccountList?.Select(x=>new { x.ID,x.BankName, x.AccountClassify, x.CardNum, x.OpenBankName, x.AccountHolder, }),
item.ID,
Name = item?.Name ?? "",
Contact = item?.Contact ?? "",
Tel = item?.Tel ?? "",
CompanyName = item?.CompanyName ?? "",
DutyParagraph = item?.DutyParagraph ?? "",
CompanyPhone = item?.CompanyPhone ?? "",
OpeningBank = item?.OpeningBank ?? "",
BankNo = item?.BankNo ?? "",
item.IsHaveShouPeiFee,
item.ShouPeiMoney });
return ApiResult.Success("", List);
}
......@@ -76,6 +94,7 @@ namespace REBORN.Services.DMCService
JObject parm = JObject.Parse(request.msg.ToString());
int supplierID = parm.GetInt("supplierID");
RB_Supplier model = suppliermodule.Get(supplierID);
var list = suppliermodule.GetSupplierTypeListModule(supplierID.ToString(), model.RB_Group_id ?? 0);
if (model != null)
{
var obj = new
......@@ -100,6 +119,7 @@ namespace REBORN.Services.DMCService
BankNo = model.BankNo ?? "",
DutyParagraph = model.DutyParagraph ?? "",
OpeningBank = model.OpeningBank ?? "",
TypeList = list?.Select(x => (int)x.Type)?.Distinct()?.ToList() ?? new List<int>()
};
return ApiResult.Success("请求成功!", obj);
}
......@@ -113,7 +133,7 @@ namespace REBORN.Services.DMCService
public virtual ApiResult SetSupplier(RequestParm request)
{
UserInfo userInfo = CacheManager.User.RbUserCache.GetUserLoginInfo(request.uid);
RB_Supplier model = JsonConvert.DeserializeObject<RB_Supplier>(request.msg.ToString());
RB_Supplier_Extend model = JsonConvert.DeserializeObject<RB_Supplier_Extend>(request.msg.ToString());
JObject parm = JObject.Parse(request.msg.ToString());
string Path = parm.GetStringValue("PicPath");
model.RB_Group_id = userInfo.RB_Group_id;
......@@ -143,7 +163,7 @@ namespace REBORN.Services.DMCService
// return ApiResult.Failed("请填写联系电话!");
//}
model.Status = Common.Enum.DateStateEnum.Normal;
bool flag = suppliermodule.Set(model, out int id);
bool flag = suppliermodule.Set(model, out int id, Type: 1);
if (flag)
return ApiResult.Success();
else
......@@ -212,14 +232,16 @@ namespace REBORN.Services.DMCService
/// <returns></returns>
public virtual ApiResult GetSupplierResourceTypeEnumList(RequestParm request)
{
var List = Common.Plugin.EnumHelper.EnumToList(typeof(Common.Enum.ResourceTypeEnum));
var List = Common.Plugin.EnumHelper.EnumToList(typeof(REBORN.Common.Enum.Finance.ClientTypeEnum));
List<EnumItem> result = new List<EnumItem>();
UserInfo userInfo = CacheManager.User.RbUserCache.GetUserLoginInfo(request.uid);
if (userInfo.SimpleEasy == 1)
{
List<int> notIdList = new List<int> { 3, 4, 7, 8, 9, 10, 11, 12, 14 };
notIdList.Add(3);
foreach (var item in List)
{
if (item.Id != 2 && item.Id != 4 && item.Id != 5 && item.Id != 6 && item.Id != 7)
if (notIdList.FindIndex(x => x == item.Id) == -1)
{
result.Add(item);
}
......
......@@ -1025,7 +1025,7 @@ namespace REBORN.Services.DMCService
{
UserInfo userInfo = CacheManager.User.RbUserCache.GetUserLoginInfo(request.uid);
JObject param = JObject.Parse(request.msg.ToString());
RB_Supplier model = new RB_Supplier()
RB_Supplier_Extend model = new RB_Supplier_Extend()
{
Type = (Common.Enum.ResourceTypeEnum)param.GetInt("Type"),
Country = param.GetInt("Country")
......
......@@ -28,6 +28,7 @@ using System.Collections;
using System.Web.UI.WebControls.WebParts;
using REBORN.Module.ConfigModule;
using REBORN.Common.EMail;
using REBORN.Model.Extend.Finance;
namespace REBORN.Services.DMCService
{
......@@ -5059,23 +5060,20 @@ namespace REBORN.Services.DMCService
Common.Plugin.LogHelper.Write(ex, "SetTeavelTeam");
}
}
if ((orderGuestList?.Count) == 0)
{
// return ApiResult.ParamIsNull("请填写入住人员名单");
}
else
if (orderGuestList!=null&& orderGuestList.Any())
{
model.GuestInfo = JsonConvert.SerializeObject(orderGuestList);
// return ApiResult.ParamIsNull("请填写入住人员名单");
}
//供应商信息(供应商名称、联系人、联系电话是必须的,营业执照号、开户信息非必填))
RB_Supplier supplierModel = new RB_Supplier //供应商id
RB_Supplier_Extend supplierModel = new RB_Supplier_Extend //供应商id
{
ID = parm.GetInt("SupplierId"),
Tel = parm.GetStringValue("Tel"),//联系人电话
Contact = parm.GetStringValue("Contact"),
Name = parm.GetStringValue("SupplierName"),
Status = Common.Enum.DateStateEnum.Normal,
Type = Common.Enum.ResourceTypeEnum.Visa,
// Type = Common.Enum.ResourceTypeEnum.Visa,
CompanyName = parm.GetStringValue("CompanyName"),//公司名称
DutyParagraph = parm.GetStringValue("DutyParagraph"),//营业执照号
CompanyPhone = parm.GetStringValue("CompanyPhone"),//电话
......@@ -5084,8 +5082,64 @@ namespace REBORN.Services.DMCService
RB_Branch_id = userInfo.RB_Branch_id,
RB_Group_id = userInfo.RB_Group_id,
RB_Department_Id = userInfo.RB_Department_Id,
TypeList = new List<int> { (int)REBORN.Common.Enum.Finance.ClientTypeEnum.VisaSupplier },
};
string clientBankAccountListStr = parm.GetStringValue("ClientBankAccountList");
List<RB_ClientBankAccount_Extend> clientBankAccountList = new List<RB_ClientBankAccount_Extend>();
if (!string.IsNullOrWhiteSpace(clientBankAccountListStr))
{
try
{
JArray clientBankAccountArray = JArray.Parse(clientBankAccountListStr);
if (clientBankAccountArray != null && clientBankAccountArray.Count > 0)
{
foreach (var jItem in clientBankAccountArray)
{
JObject jobj = JObject.Parse(JsonHelper.Serialize(jItem));
string bankName = jobj.GetStringValue("BankName");//所属机构
int accountClassify = jobj.GetInt("AccountClassify");//账户分类
string cardNum = jobj.GetStringValue("CardNum");//卡号
string openBankName = jobj.GetStringValue("OpenBankName");//开户行
string accountHolder = jobj.GetStringValue("AccountHolder");//开户人
bool isAdd = false;
if (accountClassify == 2)
{
if (!string.IsNullOrEmpty(bankName) && !string.IsNullOrEmpty(cardNum) && !string.IsNullOrEmpty(openBankName) && !string.IsNullOrEmpty(accountHolder))
{
isAdd = true;
}
}
else if (!string.IsNullOrEmpty(cardNum)) { isAdd = true; }
if (isAdd)
{
clientBankAccountList.Add(new RB_ClientBankAccount_Extend
{
BankName = bankName,//所属机构
AccountClassify = accountClassify,//账户分类
CardNum = cardNum,//卡号
OpenBankName = openBankName,//开户行
AccountHolder = accountHolder,//开户人
CreateBy = userInfo.EmployeeId,
CreateDate = DateTime.Now,
RB_Group_Id = userInfo.RB_Group_id,
RB_Branch_Id = userInfo.RB_Branch_id,
RB_BranchName = userInfo.BranchName,
RB_CreateByName = userInfo.emName,
Status = 0,
AccountType = 1,
Type = Common.Enum.Finance.ClientTypeEnum.HotelSupplier,
});
}
}
}
}
catch (Exception ex)
{
Common.Plugin.LogHelper.Write(ex, "SetTeavelTeam");
}
}
//指定op rb_appoint_op
List<RB_Appoint_OP> appointOPList = new List<RB_Appoint_OP>();
List<int> appointOPIdList = new List<int>();
......@@ -5255,7 +5309,7 @@ namespace REBORN.Services.DMCService
model.UpdateTime = DateTime.Now;
model.OrderForm = model.OrderForm ?? OrderFormEnum.Computer;
model.OrderSource = model.OrderSource ?? OrderSourceEnum.Internal;
flag = visaModule.SetVisaOrder_V2(model, VisaProductModel, tempModel, IsUpdateTCNum, supplierModel, appointOPList, orderGuestList, updateCouponAllotIds);
flag = visaModule.SetVisaOrder_V2(model, VisaProductModel, tempModel, IsUpdateTCNum, supplierModel, clientBankAccountList, appointOPList, orderGuestList, updateCouponAllotIds);
}
if (flag && isAddOrder)
{
......
......@@ -8732,8 +8732,46 @@ namespace REBORN.Services.SellService
var YesterdayOrder = toDayOrderKanBanModule.GetTodayOrderByTime(yesDayDate, qBrandId, out object yesOrderData);
var AirticketInfo = toDayOrderKanBanModule.GetDateAirticketFlightModule(qBrandId);
var CustomerInfo = toDayOrderKanBanModule.GetToDayCustomerStaticByTime(yesDayDate, qBrandId);
return ApiResult.Success("", new { YesterdayOrder, AirticketInfo , CustomerInfo });
return ApiResult.Success("", new { YesterdayOrder, AirticketInfo, CustomerInfo });
}
/// <summary>
/// 生成短连接
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public virtual ApiResult CreateHOShortUrl(RequestParm request)
{
JObject parm = JObject.Parse(request.msg.ToString());
int Id = parm.GetInt("OrderId");
int Type = parm.GetInt("Type", 0);
if (Type == 0)
{
return ApiResult.ParamIsNull();
}
int RB_Group_Id = 0;
UserInfo userInfo = CacheManager.User.RbUserCache.GetUserLoginInfo(request.uid);
RB_Group_Id = userInfo.RB_Group_id;
//Common.Enum.ResourceTypeEnum resourceType = (Common.Enum.ResourceTypeEnum)Type;
//if (resourceType == ResourceTypeEnum.TeamPrice)//团订单
//{
// var orderModel = sellOrderModule.GetOrderEntityByOrderId(Id);
// if ((orderModel?.OrderId ?? 0) == 0)
// {
// return ApiResult.Failed("订单信息不存在");
// }
// RB_Group_Id = orderModel.RB_Group_Id ?? 0;
//}
string nweIdStr = Common.DES.Encrypt(Id.ToString(), Common.Config.WebApiKey, Common.Config.WebApiIV);
string typeStr = Common.DES.Encrypt(RB_Group_Id.ToString(), Common.Config.WebApiKey, Common.Config.WebApiIV);
string url = string.Format(Common.Config.SurveyH5URL + "/?c={0}&g={1}", nweIdStr, typeStr);
ApiResult apiResult = new ApiResult()
{
data = Common.Plugin.QRCodeHelper.GetQrCode(url),
message = "",
resultCode = 1
};
return apiResult;
}
}
}
......@@ -1011,7 +1011,8 @@ namespace REBORN.Services.UserService
int CreateBy = parms.GetInt("CreateBy", 0);
string QEndCreateDate = parms.GetStringValue("QEndCreateDate");
string QStartCreateDate = parms.GetStringValue("QStartCreateDate");
var list = employeemodule.GetEmpBankAccountPageList(pageModel.pageIndex, pageModel.pageSize, out long count, EmpId, BankId, AccountHolder, AccountAlias, KeyWord, userInfo.RB_Group_id, BranchId, Type, QStartCreateDate, QEndCreateDate, AccountClassify, CreateBy);
int sourcePage = parms.GetInt("SourcePage", 0);
var list = employeemodule.GetEmpBankAccountPageList(pageModel.pageIndex, pageModel.pageSize, out long count, EmpId, BankId, AccountHolder, AccountAlias, KeyWord, userInfo.RB_Group_id, BranchId, Type, QStartCreateDate, QEndCreateDate, AccountClassify, CreateBy, sourcePage);
pageModel.count = Convert.ToInt32(count);
pageModel.pageData = list.Select(x => new
{
......
......@@ -541,4 +541,5 @@
<!--画途邮箱基础信息开始-->
<add key="MailConfig" value='[{"MailFromAccount":"service@viitto.com","MailPassword":"bSL7FkkFCBsU3omk","Title":"Travel Design产品团队","RB_Group_id":"2"}]'/>
<!--画途邮箱基础信息结束-->
<add key='SurveyH5URL' value='file:///E:/work/surprised/html/ImpressionOpinionSurvey/guestlogin.html'/>
</appSettings>
\ No newline at end of file
......@@ -1043,5 +1043,10 @@
"cmd": "sellorder_post_GetAddKanBanGuestsurvey", //数据看板热门词云数据抓取并写入数据库
"fullName": "REBORN.Services.SellService.SellOrderService",
"method": "GetAddKanBanGuestsurvey"
},
{
"cmd": "sellorder_post_CreateHOShortUrl", //获取订单意见调查表二维码
"fullName": "REBORN.Services.SellService.SellOrderService",
"method": "CreateHOShortUrl"
}
]
\ No newline at end of file
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