Commit 32846884 authored by liudong1993's avatar liudong1993

1、合同调整

parent 9736f56b
...@@ -29,6 +29,14 @@ namespace OneTwoThreeZeroOne.EContracts { ...@@ -29,6 +29,14 @@ namespace OneTwoThreeZeroOne.EContracts {
[JsonPropertyName("isMultiSignatory")] [JsonPropertyName("isMultiSignatory")]
public bool IsMultiSignatory { get; set; } public bool IsMultiSignatory { get; set; }
/// <summary>合同份数</summary>
[JsonPropertyName("contractNum")]
public string ContractNum { get; set; }
/// <summary>各持几份</summary>
[JsonPropertyName("holdNum")]
public string HoldNum { get; set; }
/// <summary>补充条款</summary> /// <summary>补充条款</summary>
[JsonPropertyName("supplementaryClause")] [JsonPropertyName("supplementaryClause")]
public string SupplementaryClause { get; set; } public string SupplementaryClause { get; set; }
...@@ -96,6 +104,15 @@ namespace OneTwoThreeZeroOne.EContracts { ...@@ -96,6 +104,15 @@ namespace OneTwoThreeZeroOne.EContracts {
/// <summary>委托事项</summary> /// <summary>委托事项</summary>
[JsonPropertyName("entrustment")] [JsonPropertyName("entrustment")]
public Entrustment Entrustment { get; set; } public Entrustment Entrustment { get; set; }
/// <summary>地接社信息</summary>
[JsonPropertyName("localTravelAgencies")]
public LocalTravelAgencies[] LocalTravelAgencies { get; set; }
/// <summary>旅行社监督、投诉信息</summary>
[JsonPropertyName("complaint")]
public Complaint Complaint { get; set; }
} }
/// <summary>合同申报结果(对应接口2.1.2返回)</summary> /// <summary>合同申报结果(对应接口2.1.2返回)</summary>
...@@ -508,6 +525,8 @@ namespace OneTwoThreeZeroOne.EContracts { ...@@ -508,6 +525,8 @@ namespace OneTwoThreeZeroOne.EContracts {
[JsonPropertyName("isChild")] public bool IsChild { get; set; } [JsonPropertyName("isChild")] public bool IsChild { get; set; }
/// <summary>国籍</summary> /// <summary>国籍</summary>
[JsonPropertyName("nationality")] public string Nationality { get; set; } [JsonPropertyName("nationality")] public string Nationality { get; set; }
/// <summary>生日</summary>
[JsonPropertyName("birthday")] public string Birthday { get; set; }
/// <summary>民族</summary> /// <summary>民族</summary>
[JsonPropertyName("race")] public string Race { get; set; } [JsonPropertyName("race")] public string Race { get; set; }
/// <summary>手机号码</summary> /// <summary>手机号码</summary>
...@@ -596,6 +615,10 @@ namespace OneTwoThreeZeroOne.EContracts { ...@@ -596,6 +615,10 @@ namespace OneTwoThreeZeroOne.EContracts {
[JsonPropertyName("excludeNote")] public string ExcludeNote { get; set; } [JsonPropertyName("excludeNote")] public string ExcludeNote { get; set; }
/// <summary>费用支付说明</summary> /// <summary>费用支付说明</summary>
[JsonPropertyName("paymentDescription")] public string PaymentDescription { get; set; } [JsonPropertyName("paymentDescription")] public string PaymentDescription { get; set; }
/// <summary>银行账号(支付方式为转账时填写)</summary>
[JsonPropertyName("payBankCard")] public string PayBankCard { get; set; }
/// <summary>其他支付方式说明(支付方式为其他时填写)</summary>
[JsonPropertyName("paymentOther")] public string PaymentOther { get; set; }
} }
/// <summary>保险信息(对应文档2.1.2中的保险部分)</summary> /// <summary>保险信息(对应文档2.1.2中的保险部分)</summary>
...@@ -625,6 +648,8 @@ namespace OneTwoThreeZeroOne.EContracts { ...@@ -625,6 +648,8 @@ namespace OneTwoThreeZeroOne.EContracts {
{ {
/// <summary>日期(YYYY-MM-DD)</summary> /// <summary>日期(YYYY-MM-DD)</summary>
[JsonPropertyName("date")] public string Date { get; set; } [JsonPropertyName("date")] public string Date { get; set; }
/// <summary>日期(YYYY-MM-DD HH)</summary>
[JsonPropertyName("activityDate")] public string ActivityDate { get; set; }
/// <summary>地点</summary> /// <summary>地点</summary>
[JsonPropertyName("place")] public string Place { get; set; } [JsonPropertyName("place")] public string Place { get; set; }
/// <summary>项目名称</summary> /// <summary>项目名称</summary>
...@@ -642,6 +667,9 @@ namespace OneTwoThreeZeroOne.EContracts { ...@@ -642,6 +667,9 @@ namespace OneTwoThreeZeroOne.EContracts {
{ {
/// <summary>日期(YYYY-MM-DD)</summary> /// <summary>日期(YYYY-MM-DD)</summary>
[JsonPropertyName("date")] public string Date { get; set; } [JsonPropertyName("date")] public string Date { get; set; }
/// <summary>日期(YYYY-MM-DD HH)</summary>
[JsonPropertyName("shoppingDate")] public string ShoppingDate { get; set; }
/// <summary>购物地点</summary> /// <summary>购物地点</summary>
[JsonPropertyName("place")] public string Place { get; set; } [JsonPropertyName("place")] public string Place { get; set; }
/// <summary>购物场所名称</summary> /// <summary>购物场所名称</summary>
...@@ -907,5 +935,28 @@ namespace OneTwoThreeZeroOne.EContracts { ...@@ -907,5 +935,28 @@ namespace OneTwoThreeZeroOne.EContracts {
/// <summary>证件信息</summary> /// <summary>证件信息</summary>
[JsonPropertyName("ID")] public TouristId ID { get; set; } [JsonPropertyName("ID")] public TouristId ID { get; set; }
} }
/// <summary>地接社信息</summary>
public sealed class LocalTravelAgencies {
/// <summary>地接社名称</summary>
[JsonPropertyName("agencyName")] public string AgencyName { get; set; }
/// <summary>联系人</summary>
[JsonPropertyName("contactName")] public string ContactName { get; set; }
/// <summary>联系电话</summary>
[JsonPropertyName("contactPhone")] public string ContactPhone { get; set; }
/// <summary>地接社地址</summary>
[JsonPropertyName("agencyAddress")] public Address AgencyAddress { get; set; }
}
/// <summary>旅行社监督、投诉信息</summary>
public sealed class Complaint
{
/// <summary>省</summary>
[JsonPropertyName("complaintProvince")] public string ComplaintProvince { get; set; }
/// <summary>市</summary>
[JsonPropertyName("complaintCity")] public string ComplaintCity { get; set; }
/// <summary>电话区号</summary>
[JsonPropertyName("complaintAreaCode")] public string ComplaintAreaCode { get; set; }
}
#endregion #endregion
} }
...@@ -1050,5 +1050,20 @@ namespace REBORN.Model.Entity.Dmc ...@@ -1050,5 +1050,20 @@ namespace REBORN.Model.Entity.Dmc
/// 合团附件 最多3个,只支持 PDF docx /// 合团附件 最多3个,只支持 PDF docx
/// </summary> /// </summary>
public string FileUrl { get; set; } public string FileUrl { get; set; }
/// <summary>
/// 地接社地址
/// </summary>
public string DmcAddress { get; set; }
/// <summary>
/// 地接社联系人
/// </summary>
public string DmcContact { get; set; }
/// <summary>
/// 地接社联系电话
/// </summary>
public string DmcContactPhone { get; set; }
} }
} }
using Newtonsoft.Json.Linq; using Newtonsoft.Json;
using Newtonsoft.Json.Linq;
using OneTwoThreeZeroOne.ContractService;
using OneTwoThreeZeroOne.EContracts;
using REBORN.Common;
using REBORN.Common.Plugin; using REBORN.Common.Plugin;
using REBORN.Model.Entity; using REBORN.Model.Entity;
using REBORN.Model.Extend; using REBORN.Model.Extend;
...@@ -10,12 +14,9 @@ using REBORN.Repository.Finance; ...@@ -10,12 +14,9 @@ using REBORN.Repository.Finance;
using REBORN.Repository.Sell; using REBORN.Repository.Sell;
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Diagnostics.Contracts;
using System.Linq; using System.Linq;
using OneTwoThreeZeroOne.ContractService;
using OneTwoThreeZeroOne.EContracts;
using Newtonsoft.Json;
using System.Text.RegularExpressions; using System.Text.RegularExpressions;
using REBORN.Common;
namespace REBORN.Module.DMCModule namespace REBORN.Module.DMCModule
{ {
...@@ -192,9 +193,15 @@ namespace REBORN.Module.DMCModule ...@@ -192,9 +193,15 @@ namespace REBORN.Module.DMCModule
// 替换结尾的 </p> 标签为换行符 // 替换结尾的 </p> 标签为换行符
result = Regex.Replace(result, @"</p>", "<br/>", RegexOptions.IgnoreCase); result = Regex.Replace(result, @"</p>", "<br/>", RegexOptions.IgnoreCase);
// 替换 <br>
result = result.Replace("<br>", "<br/>");
// 移除多余的空白字符和空行 // 移除多余的空白字符和空行
result = Regex.Replace(result, @"\s*<br/>\s*", "<br/>"); result = Regex.Replace(result, @"\s*<br/>\s*", "<br/>");
// 去除空格
result = result.Replace("&nbsp;", "");
return result.Trim(); return result.Trim();
} }
/// <summary> /// <summary>
...@@ -322,10 +329,36 @@ namespace REBORN.Module.DMCModule ...@@ -322,10 +329,36 @@ namespace REBORN.Module.DMCModule
{nameof(RB_Contract_Extend.FinalPrice),model.FinalPrice }, {nameof(RB_Contract_Extend.FinalPrice),model.FinalPrice },
{nameof(RB_Contract_Extend.PriceDescription),model.PriceDescription }, {nameof(RB_Contract_Extend.PriceDescription),model.PriceDescription },
{nameof(RB_Contract_Extend.FileUrl),model.FileUrl }, {nameof(RB_Contract_Extend.FileUrl),model.FileUrl },
{nameof(RB_Contract_Extend.DmcName),model.DmcName },
{nameof(RB_Contract_Extend.DmcAddress),model.DmcAddress },
{nameof(RB_Contract_Extend.DmcContactPhone),model.DmcContactPhone },
{nameof(RB_Contract_Extend.DmcContact),model.DmcContact },
{nameof(RB_Contract_Extend.UpdateTime),DateTime.Now }, {nameof(RB_Contract_Extend.UpdateTime),DateTime.Now },
}; };
flag = contractRepository.Update(fileds, new WhereHelper(nameof(RB_Contract_Extend.Id), model.Id)); flag = contractRepository.Update(fileds, new WhereHelper(nameof(RB_Contract_Extend.Id), model.Id));
if (flag) { if (flag) {
//添加地接社
if (!string.IsNullOrEmpty(model.DmcName))
{
var list = dictvalueRepository.GetList(new RB_Dictvalue_Extend() { RB_Group_id = model.RB_Group_Id ?? 0, DictKey = "Contract_Dmc", Name = model.DmcName });
if (!list.Any(x => x.Content == model.DmcName))
{
//新增
dictvalueRepository.Insert(new RB_Dictvalue()
{
ID = 0,
DictKey = "Contract_Dmc",
Name = model.DmcName,
Code = model.DmcContactPhone,
Content = model.DmcContact,
Mask = model.DmcAddress,
RB_Group_id = model.RB_Group_Id,
Status = Common.Enum.DateStateEnum.Normal,
UpdateBy = model.CreateBy,
UpdateDate = DateTime.Now
});
}
}
if (model.IsApplyContract == 1) if (model.IsApplyContract == 1)
{ {
Model.Entity.Dmc.RB_Contract htModel = contractRepository.GetEntity(model.Id); Model.Entity.Dmc.RB_Contract htModel = contractRepository.GetEntity(model.Id);
...@@ -353,6 +386,27 @@ namespace REBORN.Module.DMCModule ...@@ -353,6 +386,27 @@ namespace REBORN.Module.DMCModule
var newId = contractRepository.Insert(model); var newId = contractRepository.Insert(model);
model.Id = newId; model.Id = newId;
flag = newId > 0; flag = newId > 0;
if (flag && !string.IsNullOrEmpty(model.DmcName)) {
//添加地接社
var list = dictvalueRepository.GetList(new RB_Dictvalue_Extend() { RB_Group_id = model.RB_Group_Id ?? 0, DictKey = "Contract_Dmc", Name = model.DmcName });
if (!list.Any(x => x.Content == model.DmcName))
{
//新增
dictvalueRepository.Insert(new RB_Dictvalue()
{
ID = 0,
DictKey = "Contract_Dmc",
Name = model.DmcName,
Code = model.DmcContactPhone,
Content = model.DmcContact,
Mask = model.DmcAddress,
RB_Group_id = model.RB_Group_Id,
Status = Common.Enum.DateStateEnum.Normal,
UpdateBy = model.CreateBy,
UpdateDate = DateTime.Now
});
}
}
if (newId > 0 && model.IsApplyContract==1) if (newId > 0 && model.IsApplyContract==1)
{ {
TourismContractService service = GetContractService(model.RB_Group_Id ?? 0, model.RB_Branch_Id ?? 0, out string cmsg); TourismContractService service = GetContractService(model.RB_Group_Id ?? 0, model.RB_Branch_Id ?? 0, out string cmsg);
...@@ -419,7 +473,10 @@ namespace REBORN.Module.DMCModule ...@@ -419,7 +473,10 @@ namespace REBORN.Module.DMCModule
ID = TouristId, ID = TouristId,
IsSigner = false, IsSigner = false,
Health = "健康", Health = "健康",
IsChild = IsChild IsChild = IsChild,
Nationality = "",
Birthday = "",
Race = ""
}); });
if (!string.IsNullOrEmpty(htModel.Client_Name) && htModel.Client_Name == (item.SurName + item.Name)) if (!string.IsNullOrEmpty(htModel.Client_Name) && htModel.Client_Name == (item.SurName + item.Name))
...@@ -439,6 +496,7 @@ namespace REBORN.Module.DMCModule ...@@ -439,6 +496,7 @@ namespace REBORN.Module.DMCModule
Shoppings.Add(new Shopping() Shoppings.Add(new Shopping()
{ {
Date = parms.GetStringValue("specificTime"), Date = parms.GetStringValue("specificTime"),
ShoppingDate = parms.GetStringValue("specificTime"),
Place = parms.GetStringValue("Address"), Place = parms.GetStringValue("Address"),
StayDuration = parms.GetStringValue("stayTime"), StayDuration = parms.GetStringValue("stayTime"),
ShoppingPlace = parms.GetStringValue("shoppName"), ShoppingPlace = parms.GetStringValue("shoppName"),
...@@ -458,6 +516,7 @@ namespace REBORN.Module.DMCModule ...@@ -458,6 +516,7 @@ namespace REBORN.Module.DMCModule
Activities.Add(new Activity() Activities.Add(new Activity()
{ {
Date = parms.GetStringValue("specificTime"), Date = parms.GetStringValue("specificTime"),
ActivityDate = parms.GetStringValue("specificTime"),
Place = parms.GetStringValue("Address"), Place = parms.GetStringValue("Address"),
Item = parms.GetStringValue("programName"), Item = parms.GetStringValue("programName"),
Fee = parms.GetDecimal("money"), Fee = parms.GetDecimal("money"),
...@@ -466,6 +525,8 @@ namespace REBORN.Module.DMCModule ...@@ -466,6 +525,8 @@ namespace REBORN.Module.DMCModule
}); });
} }
} }
//投诉信息
var Contract_Complaint = dictvalueRepository.GetList(new RB_Dictvalue_Extend() { RB_Group_id = htModel.RB_Group_Id, DictKey = "Contract_Complaint" }).FirstOrDefault();
Console.WriteLine("4"); Console.WriteLine("4");
var req = new ApplyContractRequest var req = new ApplyContractRequest
...@@ -542,13 +603,14 @@ namespace REBORN.Module.DMCModule ...@@ -542,13 +603,14 @@ namespace REBORN.Module.DMCModule
Cost = new CostInfo() Cost = new CostInfo()
{ {
AdultCost = htModel.Adult_Price ?? 0, AdultCost = htModel.Adult_Price ?? 0,
ChildCost = htModel.Child_Price ==0?null : htModel.Child_Price, ChildCost = htModel.Child_Price == 0 ? null : htModel.Child_Price,
GuideServiceCost = htModel.Service_Price ==0?null : htModel.Service_Price, GuideServiceCost = htModel.Service_Price == 0 ? null : htModel.Service_Price,
TotalCost = htModel.Order_Price ?? 0, TotalCost = htModel.Order_Price ?? 0,
PaymentTime = htModel.Pay_Date, PaymentTime = htModel.Pay_Date,
PaymentMethod = htModel.PayType ?? 1, PaymentMethod = (htModel.PayType ?? 1) <= 2 ? (htModel.PayType ?? 1) : 4,
//ExcludeNote = "团费不包含:", //ExcludeNote = "团费不包含:",
PaymentDescription = htModel.PriceDescription PaymentDescription = htModel.PriceDescription,
PaymentOther = (htModel.PayType ?? 1) == 3 ? "线上支付" : ""
}, },
Insurance = new InsuranceInfo() Insurance = new InsuranceInfo()
{ {
...@@ -579,6 +641,30 @@ namespace REBORN.Module.DMCModule ...@@ -579,6 +641,30 @@ namespace REBORN.Module.DMCModule
AgreeToTerminate = htModel.Terminate_Opinion == "1" ? true : false, AgreeToTerminate = htModel.Terminate_Opinion == "1" ? true : false,
AgreeToMerge = htModel.Carpool_Opinion == "1" ? true : false, AgreeToMerge = htModel.Carpool_Opinion == "1" ? true : false,
MergeToCompanyName = htModel.Carpool_Company MergeToCompanyName = htModel.Carpool_Company
},
//一式几份
ContractNum = (htModel.Total_Number ?? 2).ToString(),
//各持几份
HoldNum = (htModel.Each_Number ?? 1).ToString(),
//地接社信息
LocalTravelAgencies = new LocalTravelAgencies[]
{
new LocalTravelAgencies()
{
AgencyName = htModel.DmcName,
ContactName = htModel.DmcContact,
ContactPhone = htModel.DmcContactPhone,
AgencyAddress = new Address()
{
Description = htModel.DmcAddress,
}
}
},
Complaint = new Complaint
{
ComplaintProvince = Contract_Complaint?.Name ?? null,
ComplaintCity = Contract_Complaint?.Content ?? null,
ComplaintAreaCode = Contract_Complaint?.Code ?? null
} }
}; };
if (!string.IsNullOrEmpty(htModel.FileUrl)) { if (!string.IsNullOrEmpty(htModel.FileUrl)) {
...@@ -1212,7 +1298,9 @@ namespace REBORN.Module.DMCModule ...@@ -1212,7 +1298,9 @@ namespace REBORN.Module.DMCModule
Race = "", Race = "",
Health = item.CGuestHealth, Health = item.CGuestHealth,
ID = TouristId, ID = TouristId,
IsChild = IsChild == "1" ? true : false IsChild = IsChild == "1" ? true : false,
Nationality = "",
Birthday = ""
}); });
//if (!string.IsNullOrEmpty(htModel.Tourists_Name) && htModel.Tourists_Name == item.CGuestName) //if (!string.IsNullOrEmpty(htModel.Tourists_Name) && htModel.Tourists_Name == item.CGuestName)
...@@ -1294,6 +1382,7 @@ namespace REBORN.Module.DMCModule ...@@ -1294,6 +1382,7 @@ namespace REBORN.Module.DMCModule
Shoppings.Add(new Shopping() Shoppings.Add(new Shopping()
{ {
Date = item.ShopTime, Date = item.ShopTime,
ShoppingDate = item.ShopTime,
Place = item.ShopAddress, Place = item.ShopAddress,
StayDuration = item.StopTime, StayDuration = item.StopTime,
ShoppingPlace = item.ShopName, ShoppingPlace = item.ShopName,
...@@ -1308,6 +1397,7 @@ namespace REBORN.Module.DMCModule ...@@ -1308,6 +1397,7 @@ namespace REBORN.Module.DMCModule
Activities.Add(new Activity() Activities.Add(new Activity()
{ {
Date = item.SelfFeeTime, Date = item.SelfFeeTime,
ActivityDate = item.SelfFeeTime,
Place = item.SelfFeeAddress, Place = item.SelfFeeAddress,
Item = item.SelfFeeName, Item = item.SelfFeeName,
Fee = Convert.ToDecimal(item.SelfFeePrice), Fee = Convert.ToDecimal(item.SelfFeePrice),
...@@ -1409,9 +1499,10 @@ namespace REBORN.Module.DMCModule ...@@ -1409,9 +1499,10 @@ namespace REBORN.Module.DMCModule
GuideServiceCost = htModel.C_GuideServicePrice ==0?null : htModel.C_GuideServicePrice, GuideServiceCost = htModel.C_GuideServicePrice ==0?null : htModel.C_GuideServicePrice,
TotalCost = htModel.C_TotalPrice ?? 0, TotalCost = htModel.C_TotalPrice ?? 0,
PaymentTime = htModel.C_PayDate.HasValue ? htModel.C_PayDate.Value.ToString("yyyy-MM-dd") : "", PaymentTime = htModel.C_PayDate.HasValue ? htModel.C_PayDate.Value.ToString("yyyy-MM-dd") : "",
PaymentMethod = (htModel.C_PayType == 1 ? 1 : htModel.C_PayType == 5 ? 2 : 3), PaymentMethod = (htModel.C_PayType == 1 ? 1 : htModel.C_PayType == 5 ? 2 : 4),
ExcludeNote = htModel.C_NonIncludeRemark, ExcludeNote = htModel.C_NonIncludeRemark,
PaymentDescription = "" PaymentDescription = "",
PaymentOther = (htModel.C_PayType ?? 1) != 1 && (htModel.C_PayType ?? 1) != 5 ? "线上支付" : ""
}, },
Insurance = new InsuranceInfo() Insurance = new InsuranceInfo()
{ {
...@@ -1440,7 +1531,11 @@ namespace REBORN.Module.DMCModule ...@@ -1440,7 +1531,11 @@ namespace REBORN.Module.DMCModule
AgreeToTerminate = htModel.C_IsAgreeRemove == 1, AgreeToTerminate = htModel.C_IsAgreeRemove == 1,
AgreeToMerge = htModel.C_IsAgreeSpellGroup == 1, AgreeToMerge = htModel.C_IsAgreeSpellGroup == 1,
MergeToCompanyName = htModel.C_SpellGroupName MergeToCompanyName = htModel.C_SpellGroupName
} },
//一式几份
ContractNum = "2",
//各持几份
HoldNum = "1"
}; };
...@@ -1488,7 +1583,7 @@ namespace REBORN.Module.DMCModule ...@@ -1488,7 +1583,7 @@ namespace REBORN.Module.DMCModule
TotalCount = htModel.TicketTotalNum, TotalCount = htModel.TicketTotalNum,
TotalCost = htModel.TicketTotalDepositPrice, TotalCost = htModel.TicketTotalDepositPrice,
Flights = Flights.ToArray(), Flights = Flights.ToArray(),
Memo = htModel.TicketDescription Memo = !string.IsNullOrWhiteSpace(htModel.OtherConvention)?ReplaceParagraphTagsWithNewlines(htModel.OtherConvention): htModel.TicketDescription
} }
}; };
...@@ -1532,8 +1627,7 @@ namespace REBORN.Module.DMCModule ...@@ -1532,8 +1627,7 @@ namespace REBORN.Module.DMCModule
{ {
Accommodations = Accommodations.ToArray(), Accommodations = Accommodations.ToArray(),
TotalPrice = htModel.HotelTotalPrice, TotalPrice = htModel.HotelTotalPrice,
Memo = htModel.HotelDescription Memo = !string.IsNullOrWhiteSpace(htModel.OtherConvention) ? ReplaceParagraphTagsWithNewlines(htModel.OtherConvention) : htModel.HotelDescription
}; };
foreach (var item in termsList.Where(x => x.SNO == 2)) foreach (var item in termsList.Where(x => x.SNO == 2))
...@@ -1576,9 +1670,8 @@ namespace REBORN.Module.DMCModule ...@@ -1576,9 +1670,8 @@ namespace REBORN.Module.DMCModule
{ {
TransportServices = TransportServices.ToArray(), TransportServices = TransportServices.ToArray(),
TotalCost = htModel.PickUpTotalPrice, TotalCost = htModel.PickUpTotalPrice,
Memo = htModel.PickUpDescription, TotalNumber = htModel.PickUpTNumber,
TotalNumber = htModel.PickUpTNumber Memo = !string.IsNullOrWhiteSpace(htModel.OtherConvention)?ReplaceParagraphTagsWithNewlines(htModel.OtherConvention): htModel.PickUpDescription
}; };
foreach (var item in termsList.Where(x => x.SNO == 3)) foreach (var item in termsList.Where(x => x.SNO == 3))
{ {
...@@ -1618,10 +1711,9 @@ namespace REBORN.Module.DMCModule ...@@ -1618,10 +1711,9 @@ namespace REBORN.Module.DMCModule
{ {
VisaServices = VisaServices.ToArray(), VisaServices = VisaServices.ToArray(),
TotalCost = htModel.VisaTotalPrice, TotalCost = htModel.VisaTotalPrice,
Memo = htModel.VisaDescription, Memo = !string.IsNullOrWhiteSpace(htModel.OtherConvention) ? ReplaceParagraphTagsWithNewlines(htModel.OtherConvention) : htModel.VisaDescription,
TotalNumber = htModel.VisaTNumber, TotalNumber = htModel.VisaTNumber,
VisaDeadline = htModel.VisaDeadline VisaDeadline = htModel.VisaDeadline
}; };
foreach (var item in termsList.Where(x => x.SNO == 4)) foreach (var item in termsList.Where(x => x.SNO == 4))
{ {
...@@ -2281,6 +2373,23 @@ namespace REBORN.Module.DMCModule ...@@ -2281,6 +2373,23 @@ namespace REBORN.Module.DMCModule
{ {
return startcityRepository.GetList(new Model.Extend.RB_Startcity_Extend() { RB_Branch_id = -1, QStartIDs = CityIds }); return startcityRepository.GetList(new Model.Extend.RB_Startcity_Extend() { RB_Branch_id = -1, QStartIDs = CityIds });
} }
/// <summary>
/// 获取字典 地接社信息
/// </summary>
/// <param name="rB_Group_id"></param>
/// <returns></returns>
public object GetDmcCompanyList(int rB_Group_id)
{
var list = dictvalueRepository.GetList(new RB_Dictvalue_Extend() { RB_Group_id = rB_Group_id, DictKey = "Contract_Dmc" });
return list.Select(x => new
{
CompanyName = x.Name,
ContactPhone = x.Code,
ContactName = x.Content,
Address = x.Mask
});
}
#endregion #endregion
} }
} }
...@@ -310,6 +310,10 @@ namespace REBORN.Services.DMCService ...@@ -310,6 +310,10 @@ namespace REBORN.Services.DMCService
FinalPrice = parm.GetDecimal("finalPrice"), FinalPrice = parm.GetDecimal("finalPrice"),
PriceDescription = parm.GetStringValue("priceDescription"), PriceDescription = parm.GetStringValue("priceDescription"),
IsApplyContract = parm.GetInt("isApplyContract"),//是否上传合同 IsApplyContract = parm.GetInt("isApplyContract"),//是否上传合同
DmcName = parm.GetStringValue("dmcName"),
DmcAddress = parm.GetStringValue("dmcAddress"),
DmcContact = parm.GetStringValue("dmcContact"),
DmcContactPhone = parm.GetStringValue("dmcContactPhone"),
}; };
#region 去除Html标签 #region 去除Html标签
...@@ -432,7 +436,6 @@ namespace REBORN.Services.DMCService ...@@ -432,7 +436,6 @@ namespace REBORN.Services.DMCService
{ {
model.CreateBy = userInfo.EmployeeId; model.CreateBy = userInfo.EmployeeId;
model.CreateTime = DateTime.Now; model.CreateTime = DateTime.Now;
model.RB_Group_Id = userInfo.RB_Group_id;
model.RB_Branch_Id = userInfo.RB_Branch_id; model.RB_Branch_Id = userInfo.RB_Branch_id;
model.IsTravelAgencySignature = 0; model.IsTravelAgencySignature = 0;
model.AuditContract = 0; model.AuditContract = 0;
...@@ -474,6 +477,7 @@ namespace REBORN.Services.DMCService ...@@ -474,6 +477,7 @@ namespace REBORN.Services.DMCService
model.Id = oldModel?.Id ?? 0; model.Id = oldModel?.Id ?? 0;
} }
//判断是否存在 //判断是否存在
model.RB_Group_Id = userInfo.RB_Group_id;
model.UpdateBy = userInfo.EmployeeId; model.UpdateBy = userInfo.EmployeeId;
model.UpdateTime = DateTime.Now; model.UpdateTime = DateTime.Now;
var flag = travelContractModule.SetContractModule(model); var flag = travelContractModule.SetContractModule(model);
...@@ -598,6 +602,10 @@ namespace REBORN.Services.DMCService ...@@ -598,6 +602,10 @@ namespace REBORN.Services.DMCService
IsTravelAgencySignature = 0, IsTravelAgencySignature = 0,
AuditContract = 0, AuditContract = 0,
PriceDescription = oldModel.PriceDescription, PriceDescription = oldModel.PriceDescription,
DmcName = oldModel.DmcName,
DmcContact = oldModel.DmcContact,
DmcContactPhone = oldModel.DmcContactPhone,
DmcAddress = oldModel.DmcAddress,
}; };
model.EnterId = travelContractModule.GetTravelOrder(model.OrderId ?? 0)?.EnterID ?? 0; model.EnterId = travelContractModule.GetTravelOrder(model.OrderId ?? 0)?.EnterID ?? 0;
...@@ -1040,7 +1048,11 @@ namespace REBORN.Services.DMCService ...@@ -1040,7 +1048,11 @@ namespace REBORN.Services.DMCService
thirdContractQRCode = model?.ThirdContractQRCode, thirdContractQRCode = model?.ThirdContractQRCode,
thirdContractFileUrl = model?.ThirdContractFileUrl, thirdContractFileUrl = model?.ThirdContractFileUrl,
contractTemplete = model?.ContractTemplete, contractTemplete = model?.ContractTemplete,
fileList = !string.IsNullOrEmpty(model?.FileUrl) ? JsonHelper.DeserializeObject<List<ContractFile>>(model?.FileUrl) : new List<ContractFile>() fileList = !string.IsNullOrEmpty(model?.FileUrl) ? JsonHelper.DeserializeObject<List<ContractFile>>(model?.FileUrl) : new List<ContractFile>(),
dmcName = model?.DmcName,
dmcAddress = model?.DmcAddress,
dmcContact = model?.DmcContact,
dmcContactPhone = model?.DmcContactPhone,
}; };
return ApiResult.Success(data: result); return ApiResult.Success(data: result);
} }
...@@ -2179,5 +2191,19 @@ namespace REBORN.Services.DMCService ...@@ -2179,5 +2191,19 @@ namespace REBORN.Services.DMCService
return ApiResult.Success("操作成功!", data: obj); return ApiResult.Success("操作成功!", data: obj);
} }
#endregion #endregion
#region 获取地接社信息
/// <summary>
/// 获取地接社信息
/// </summary>
/// <param name="request"></param>
/// <returns></returns>
public virtual ApiResult GetDmcCompanyList(RequestParm request)
{
UserInfo userInfo = CacheManager.User.RbUserCache.GetUserLoginInfo(request.uid);
var list = travelContractModule.GetDmcCompanyList(userInfo.RB_Group_id);
return ApiResult.Success("", list);
}
#endregion
} }
} }
...@@ -750,5 +750,10 @@ ...@@ -750,5 +750,10 @@
"fullName": "REBORN.Services.DMCService.DMCTicketLossService", "fullName": "REBORN.Services.DMCService.DMCTicketLossService",
"method": "SetTravelTicketLoss", "method": "SetTravelTicketLoss",
"checkFormRepeatSubmit": true //验证表单重复提交 "checkFormRepeatSubmit": true //验证表单重复提交
},
{
"cmd": "travelcontract_post_GetDmcCompanyList", //获取地接社列表
"fullName": "REBORN.Services.DMCService.TravelContractService",
"method": "GetDmcCompanyList"
} }
] ]
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