Commit b65731fe authored by liudong1993's avatar liudong1993
parents 7a7737fc 1425abf7
......@@ -2,6 +2,7 @@
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using System.Linq;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
......@@ -14,8 +15,6 @@ namespace REBORN.Common.Plugin
/// </summary>
public class StringHelper
{
private const string digits = "0123456789";
private const string letters = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
private static Random random = new Random();
#region "随机数"
/// <summary>
......@@ -24,22 +23,15 @@ namespace REBORN.Common.Plugin
/// <returns></returns>
public static string GenerateRandomString()
{
char[] result = new char[10];
// 生成9位随机数字
string digits = new string(Enumerable.Repeat("0123456789", 9)
.Select(s => s[random.Next(s.Length)]).ToArray());
// 先填充9位数字
for (int i = 0; i < 9; i++)
{
result[i] = (char)random.Next('0', '9' + 1);
}
// 生成1位字母
char letter = (char)random.Next('A', 'Z' + 1);
// 随机选择一个位置插入字母
int letterPosition = random.Next(10);
result[letterPosition] = letter;
// 生成1位随机字母(只包含大写字母)
string letter = ((char)random.Next('A', 'Z' + 1)).ToString();
return new string(result);
// 字母放在最后
return digits + letter;
}
/// <summary>
......
......@@ -3207,7 +3207,8 @@ TEL:03-3779-9111";
{ nameof(RB_Sell_VisaOrder.FinalPriceTips),model.FinalPriceTips},
{ nameof(RB_Sell_VisaOrder.SupplierId),model.SupplierId},
{ nameof(RB_Sell_VisaOrder.VisaId),model.VisaId},
{ nameof(RB_Sell_VisaOrder.RB_Branch_Id),model.RB_Branch_Id},
{ nameof(RB_Sell_VisaOrder.CreateBy),model.CreateBy},
};
IList<WhereHelper> whereHelpers = new List<WhereHelper>()
{
......
......@@ -5589,7 +5589,7 @@ namespace REBORN.Module.SellModule
tmodel.OutBranchId = userInfo.RB_Branch_id;
tmodel.RB_Group_Id = dmodel.RB_Group_Id;
tmodel.RB_Department_Id = userInfo.RB_Department_Id;
tmodel.TCNUM = StringHelper.FormatDate(tmodel.StartDate) +StringHelper.GenerateRandomString();
tmodel.TCNUM = tmodel.StartDate.Value.ToString("yyyyMMdd") + StringHelper.GenerateRandomString();
tmodel.Status = GroupStateEnum.Normal;
tmodel.TCState = TravelSaleStateEnum.SaleTeam;
var hotelId = travel_PriceRepository.Insert(tmodel);
......@@ -6043,6 +6043,8 @@ namespace REBORN.Module.SellModule
tomodel.ContactName = dmodel.ContactName;
tomodel.ContactMobile = dmodel.ContactMobile;
tomodel.IsLeaderOrder = 0;
tomodel.EnterID = dmodel.EnterID;
tomodel.RB_Branch_Id = dmodel.RB_Branch_Id;
orderRepository.Update(tomodel, trans);
//验证 团款是否收齐
if ((tomodel.PreferPrice ?? 0) <= (tomodel.Income ?? 0) + (tomodel.PlatformTax ?? 0) + (tomodel.DiscountMoney ?? 0) + (tomodel.RedEnvelopeMoney ?? 0) - (tomodel.Refund ?? 0))
......@@ -5028,6 +5028,11 @@ namespace REBORN.Services.DMCService
Meet = parm.GetDecimal("Meet"),
TotalPrice = parm.GetDecimal("TotalPrice"),
};
int createBy = parm.GetInt("CreateBy", 0);
if (createBy > 0)
{
userInfo = CacheManager.User.RbUserCache.GetUserLoginInfo(createBy.ToString());
}
//出行人员名单(姓名、电话、出生年月日是必须的、护照号、身份证号、护照有效期非必填)
string guestInfoStr = parm.GetStringValue("GuestList");
List<RB_Travel_Guest_Extend> orderGuestList = new List<RB_Travel_Guest_Extend>();
......@@ -5232,15 +5237,6 @@ namespace REBORN.Services.DMCService
model.VisaOrderStatus = 1;
model.IsCommission = 2;
model.Income = 0;
//if (model.ClientType == 2)
//{
// model.TotalPrice = VisaProductModel.VisaB2CPrice * model.PeopleNum;
//}
//else
//{
// model.TotalPrice = VisaProductModel.VisaPrice * model.PeopleNum;
//}
// IsUpdateTCNum = false;
}
else
{
......@@ -5298,8 +5294,8 @@ namespace REBORN.Services.DMCService
model.DiscountMoney = 0;
}
#endregion
model.RB_Branch_Id = userInfo.RB_Branch_id;
model.CreateBy = userInfo.EmployeeId;
model.Unit_Price = Math.Round((model.TotalPrice ?? 0) / (model.PeopleNum ?? 1), 2); //VisaProductModel.VisaPrice;
model.UnitB2C_Price = VisaProductModel.VisaB2CPrice;
model.CommissionMoney = VisaProductModel.CommissionPrice;
......@@ -5684,6 +5680,7 @@ namespace REBORN.Services.DMCService
x.FinalPriceTips,
x.Meet,
x.OtherContractList,
CreateBy = x.CreateBy ?? 0,
ContractType = Common.Enum.ResourceTypeEnum.Visa,
SupplierModel = new { SupplierId = x?.SupplierModel?.ID ?? 0, SupplierName = x?.SupplierModel?.Name ?? "", Tel = x?.SupplierModel?.Tel ?? "", Contact = x?.SupplierModel?.Contact ?? "", CompanyName = x?.SupplierModel?.CompanyName ?? "", DutyParagraph = x?.SupplierModel?.DutyParagraph ?? "", CompanyPhone = x?.SupplierModel?.CompanyPhone ?? "", OpeningBank = x?.SupplierModel?.OpeningBank ?? "", BankNo = x?.SupplierModel?.BankNo ?? "" },
AppointOPList = x.AppointOPList?.Select(z => new { z.OPId, OPName = CacheManager.User.RbUserCache.GetUserLoginInfo(z.OPId.ToString())?.emName ?? "" }),
......
......@@ -11777,6 +11777,8 @@ namespace REBORN.Services.SellService
AppointOPList = x.AppointOPInfoList?.Select(z => new { z.OPId, OPName = CacheManager.User.RbUserCache.GetUserLoginInfo(z.OPId.ToString())?.emName ?? "" }),
x.WordPathFileData,
Branch_Id = x.RB_Branch_Id,
EnterID = x.EnterID,
CreateBy = x.EnterID,
});
pmodel.count = int.Parse(count.ToString());
pmodel.pageData = data;
......
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