|
@@ -410,7 +410,7 @@ namespace OASystem.API.Controllers
|
|
//团组名称
|
|
//团组名称
|
|
if (!string.IsNullOrEmpty(dto.TeamName))
|
|
if (!string.IsNullOrEmpty(dto.TeamName))
|
|
{
|
|
{
|
|
- sqlWhere += string.Format(@"And TeamName Like '%{0}%'",dto.TeamName);
|
|
|
|
|
|
+ sqlWhere += string.Format(@"And TeamName Like '%{0}%'", dto.TeamName);
|
|
}
|
|
}
|
|
|
|
|
|
//客户名称
|
|
//客户名称
|
|
@@ -445,7 +445,7 @@ namespace OASystem.API.Controllers
|
|
Inner Join Sys_SetData ssd1 On gdi.TeamLevSId = ssd1.Id
|
|
Inner Join Sys_SetData ssd1 On gdi.TeamLevSId = ssd1.Id
|
|
Left Join Sys_Users su On gdi.JietuanOperator = su.Id
|
|
Left Join Sys_Users su On gdi.JietuanOperator = su.Id
|
|
Where gdi.IsDel = 0 {1}
|
|
Where gdi.IsDel = 0 {1}
|
|
- ) temp ", orderbyStr , sqlWhere);
|
|
|
|
|
|
+ ) temp ", orderbyStr, sqlWhere);
|
|
|
|
|
|
|
|
|
|
RefAsync<int> total = 0;//REF和OUT不支持异步,想要真的异步这是最优解
|
|
RefAsync<int> total = 0;//REF和OUT不支持异步,想要真的异步这是最优解
|
|
@@ -546,12 +546,12 @@ namespace OASystem.API.Controllers
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|
|
- else if(dto.Status == 2)
|
|
|
|
|
|
+ else if (dto.Status == 2)
|
|
{
|
|
{
|
|
diId = dto.Id;
|
|
diId = dto.Id;
|
|
}
|
|
}
|
|
|
|
|
|
- return Ok(JsonView(true,"操作成功!", diId));
|
|
|
|
|
|
+ return Ok(JsonView(true, "操作成功!", diId));
|
|
}
|
|
}
|
|
catch (Exception ex)
|
|
catch (Exception ex)
|
|
{
|
|
{
|
|
@@ -602,7 +602,7 @@ namespace OASystem.API.Controllers
|
|
diId = groupData.Data;
|
|
diId = groupData.Data;
|
|
await GeneralMethod.PostGroupRateAddInit(dto.UserId, diId);
|
|
await GeneralMethod.PostGroupRateAddInit(dto.UserId, diId);
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
if (dto.Status == 2)
|
|
if (dto.Status == 2)
|
|
{
|
|
{
|
|
@@ -632,6 +632,53 @@ namespace OASystem.API.Controllers
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 建团添加默认工作人员团组权限测试
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dto"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPost]
|
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
|
+ public async Task<IActionResult> PostGroupAuthAddInit(int userId, int diId)
|
|
|
|
+ {
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ GeneralMethod.PostGroupAuthAddInit(userId, diId);
|
|
|
|
+
|
|
|
|
+ return Ok(JsonView(true));
|
|
|
|
+ }
|
|
|
|
+ catch (Exception ex)
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ Logs(ex.Message);
|
|
|
|
+ return Ok(JsonView(false, ex.Message));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 建团添加默认币种测试
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dto"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPost]
|
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
|
+ public async Task<IActionResult> GroupOperation11(int userId, int diId)
|
|
|
|
+ {
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ GeneralMethod.PostGroupRateAddInit(userId, diId);
|
|
|
|
+
|
|
|
|
+ return Ok(JsonView(true));
|
|
|
|
+ }
|
|
|
|
+ catch (Exception ex)
|
|
|
|
+ {
|
|
|
|
+
|
|
|
|
+ Logs(ex.Message);
|
|
|
|
+ return Ok(JsonView(false, ex.Message));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 接团信息 操作(删除)
|
|
/// 接团信息 操作(删除)
|
|
/// </summary>
|
|
/// </summary>
|
|
@@ -1164,6 +1211,8 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
Grp_CreditCardPaymentView _view = new Grp_CreditCardPaymentView();
|
|
Grp_CreditCardPaymentView _view = new Grp_CreditCardPaymentView();
|
|
|
|
|
|
|
|
+ List<SimplClientInfo> clientNameList = getSimplClientList(_dto.DiId);
|
|
|
|
+
|
|
#region 费用清单
|
|
#region 费用清单
|
|
var exp = Expressionable.Create<Grp_CreditCardPayment>();
|
|
var exp = Expressionable.Create<Grp_CreditCardPayment>();
|
|
exp.AndIF(_dto.AuditStatus != -1, it => it.IsAuditGM == _dto.AuditStatus);
|
|
exp.AndIF(_dto.AuditStatus != -1, it => it.IsAuditGM == _dto.AuditStatus);
|
|
@@ -1204,6 +1253,7 @@ namespace OASystem.API.Controllers
|
|
List<Grp_VisaInfo> _VisaInfos = await _groupRepository
|
|
List<Grp_VisaInfo> _VisaInfos = await _groupRepository
|
|
.Query<Grp_VisaInfo>(s => s.DIId == _dto.DiId && s.IsDel == 0)
|
|
.Query<Grp_VisaInfo>(s => s.DIId == _dto.DiId && s.IsDel == 0)
|
|
.ToListAsync();
|
|
.ToListAsync();
|
|
|
|
+
|
|
|
|
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -1239,11 +1289,11 @@ namespace OASystem.API.Controllers
|
|
/*
|
|
/*
|
|
* 285://收款退还
|
|
* 285://收款退还
|
|
*/
|
|
*/
|
|
- List<Fin_PaymentRefundAndOtherMoney> _PaymentRefundAndOtherMoneys= await _groupRepository
|
|
|
|
|
|
+ List<Fin_PaymentRefundAndOtherMoney> _PaymentRefundAndOtherMoneys = await _groupRepository
|
|
.Query<Fin_PaymentRefundAndOtherMoney>(s => s.DiId == _dto.DiId && s.IsDel == 0)
|
|
.Query<Fin_PaymentRefundAndOtherMoney>(s => s.DiId == _dto.DiId && s.IsDel == 0)
|
|
.ToListAsync();
|
|
.ToListAsync();
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
/*
|
|
/*
|
|
* 币种信息
|
|
* 币种信息
|
|
*/
|
|
*/
|
|
@@ -1344,15 +1394,15 @@ namespace OASystem.API.Controllers
|
|
Grp_HotelReservations hotelReservations = _HotelReservations.Where(s => s.Id == entity.CId).FirstOrDefault();
|
|
Grp_HotelReservations hotelReservations = _HotelReservations.Where(s => s.Id == entity.CId).FirstOrDefault();
|
|
if (hotelReservations != null)
|
|
if (hotelReservations != null)
|
|
{
|
|
{
|
|
- string GovernmentRentCode ="",GovernmentRentName = "", CityTaxCode="",CityTaxName = "", BreakfastCode="", BreakfastName = "";
|
|
|
|
|
|
+ string GovernmentRentCode = "", GovernmentRentName = "", CityTaxCode = "", CityTaxName = "", BreakfastCode = "", BreakfastName = "";
|
|
Sys_SetData sdPaymentCurrency_GovernmentRent = currencyItems.Where(s => s.Id == hotelReservations.GovernmentRentCurrency).FirstOrDefault();
|
|
Sys_SetData sdPaymentCurrency_GovernmentRent = currencyItems.Where(s => s.Id == hotelReservations.GovernmentRentCurrency).FirstOrDefault();
|
|
- if (sdPaymentCurrency_GovernmentRent!= null)
|
|
|
|
|
|
+ if (sdPaymentCurrency_GovernmentRent != null)
|
|
{
|
|
{
|
|
GovernmentRentCode = sdPaymentCurrency_GovernmentRent.Name;
|
|
GovernmentRentCode = sdPaymentCurrency_GovernmentRent.Name;
|
|
GovernmentRentName = sdPaymentCurrency_GovernmentRent.Remark;
|
|
GovernmentRentName = sdPaymentCurrency_GovernmentRent.Remark;
|
|
}
|
|
}
|
|
|
|
|
|
- Sys_SetData sdPaymentCurrency_CityTax = currencyItems.Where(s => s.Id == hotelReservations.CityTaxCurrency).FirstOrDefault();
|
|
|
|
|
|
+ Sys_SetData sdPaymentCurrency_CityTax = currencyItems.Where(s => s.Id == hotelReservations.CityTaxCurrency).FirstOrDefault();
|
|
if (sdPaymentCurrency_CityTax != null)
|
|
if (sdPaymentCurrency_CityTax != null)
|
|
{
|
|
{
|
|
CityTaxCode = sdPaymentCurrency_CityTax.Name;
|
|
CityTaxCode = sdPaymentCurrency_CityTax.Name;
|
|
@@ -1370,7 +1420,7 @@ namespace OASystem.API.Controllers
|
|
$"房间说明: {hotelReservations.Remark} <br/>" +
|
|
$"房间说明: {hotelReservations.Remark} <br/>" +
|
|
$"地税: {hotelReservations.GovernmentRent} {GovernmentRentCode} ({GovernmentRentName})<br/>" +
|
|
$"地税: {hotelReservations.GovernmentRent} {GovernmentRentCode} ({GovernmentRentName})<br/>" +
|
|
$"城市税: {hotelReservations.CityTax} {CityTaxCode} ({CityTaxName})<br/>" +
|
|
$"城市税: {hotelReservations.CityTax} {CityTaxCode} ({CityTaxName})<br/>" +
|
|
- $"酒店早餐: {hotelReservations.BreakfastPrice} {BreakfastCode} ({BreakfastName})<br/>"+
|
|
|
|
|
|
+ $"酒店早餐: {hotelReservations.BreakfastPrice} {BreakfastCode} ({BreakfastName})<br/>" +
|
|
$"酒店早餐是否由地接代付: {isoppayStr}";
|
|
$"酒店早餐是否由地接代付: {isoppayStr}";
|
|
_detail.PriceNameContent = hotelReservations.HotelName;
|
|
_detail.PriceNameContent = hotelReservations.HotelName;
|
|
}
|
|
}
|
|
@@ -1385,7 +1435,7 @@ namespace OASystem.API.Controllers
|
|
_detail.BusName = touristGuideGroundReservations.BusName;
|
|
_detail.BusName = touristGuideGroundReservations.BusName;
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
|
|
+
|
|
_detail.PriceNameContent = touristGuideGroundReservations.Area;
|
|
_detail.PriceNameContent = touristGuideGroundReservations.Area;
|
|
|
|
|
|
List<Grp_CarTouristGuideGroundReservationsContent> touristGuideGroundReservationsContents = _CarTouristGuideGroundReservationsContent
|
|
List<Grp_CarTouristGuideGroundReservationsContent> touristGuideGroundReservationsContents = _CarTouristGuideGroundReservationsContent
|
|
@@ -1421,7 +1471,7 @@ namespace OASystem.API.Controllers
|
|
Grp_VisaInfo visaInfo = _VisaInfos.Where(s => s.Id == entity.CId).FirstOrDefault();
|
|
Grp_VisaInfo visaInfo = _VisaInfos.Where(s => s.Id == entity.CId).FirstOrDefault();
|
|
if (visaInfo != null)
|
|
if (visaInfo != null)
|
|
{
|
|
{
|
|
- _detail.PriceNameContent = visaInfo.VisaClient;
|
|
|
|
|
|
+ _detail.PriceNameContent = getClientNameStr(clientNameList, visaInfo.VisaClient);
|
|
_detail.PriceMsgContent = "备注:" + visaInfo.Remark;
|
|
_detail.PriceMsgContent = "备注:" + visaInfo.Remark;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1433,7 +1483,7 @@ namespace OASystem.API.Controllers
|
|
{
|
|
{
|
|
|
|
|
|
string ioaCurrencyCode = "Unknown";
|
|
string ioaCurrencyCode = "Unknown";
|
|
- string ioaCurrencyName= "Unknown";
|
|
|
|
|
|
+ string ioaCurrencyName = "Unknown";
|
|
|
|
|
|
var currencyData = currencyItems.Where(s => s.Id == invitationOfficialActivities.InviteCurrency && s.IsDel == 0).FirstOrDefault();
|
|
var currencyData = currencyItems.Where(s => s.Id == invitationOfficialActivities.InviteCurrency && s.IsDel == 0).FirstOrDefault();
|
|
if (currencyData != null)
|
|
if (currencyData != null)
|
|
@@ -1443,7 +1493,7 @@ namespace OASystem.API.Controllers
|
|
}
|
|
}
|
|
|
|
|
|
_detail.PriceNameContent = invitationOfficialActivities.InviterArea;
|
|
_detail.PriceNameContent = invitationOfficialActivities.InviterArea;
|
|
- _detail.PriceMsgContent = "邀请费用:" + invitationOfficialActivities.InviteCost + " "+ ioaCurrencyCode + "("+ ioaCurrencyName+ ")<br/>" +
|
|
|
|
|
|
+ _detail.PriceMsgContent = "邀请费用:" + invitationOfficialActivities.InviteCost + " " + ioaCurrencyCode + "(" + ioaCurrencyName + ")<br/>" +
|
|
"活动费用:- <br/>" +
|
|
"活动费用:- <br/>" +
|
|
"备注:" + invitationOfficialActivities.Remark + "<br/>";
|
|
"备注:" + invitationOfficialActivities.Remark + "<br/>";
|
|
|
|
|
|
@@ -1455,7 +1505,7 @@ namespace OASystem.API.Controllers
|
|
Grp_Customers customers = _Customers.Where(s => s.Id == entity.Id && s.IsDel == 0).FirstOrDefault();
|
|
Grp_Customers customers = _Customers.Where(s => s.Id == entity.Id && s.IsDel == 0).FirstOrDefault();
|
|
if (customers != null)
|
|
if (customers != null)
|
|
{
|
|
{
|
|
- _detail.PriceNameContent = customers.ClientName;
|
|
|
|
|
|
+ _detail.PriceNameContent = getClientNameStr(clientNameList, customers.ClientName);
|
|
_detail.PriceMsgContent = "备注:" + customers.Remark + "<br/>";
|
|
_detail.PriceMsgContent = "备注:" + customers.Remark + "<br/>";
|
|
}
|
|
}
|
|
|
|
|
|
@@ -1488,7 +1538,7 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
break;
|
|
break;
|
|
case 751://酒店早餐
|
|
case 751://酒店早餐
|
|
-
|
|
|
|
|
|
+
|
|
break;
|
|
break;
|
|
default:
|
|
default:
|
|
break;
|
|
break;
|
|
@@ -1588,7 +1638,7 @@ namespace OASystem.API.Controllers
|
|
if (strs.Count > 0)
|
|
if (strs.Count > 0)
|
|
{
|
|
{
|
|
decimal amountPayable = strs.Sum(it => it.AmountPayable);
|
|
decimal amountPayable = strs.Sum(it => it.AmountPayable);
|
|
-
|
|
|
|
|
|
+
|
|
decimal balancePayment = strs.Sum(it => it.BalancePayment);
|
|
decimal balancePayment = strs.Sum(it => it.BalancePayment);
|
|
amountPayableStr += string.Format(@"{0}{1} |", amountPayable.ToString("#0.00"), item.CurrencyName);
|
|
amountPayableStr += string.Format(@"{0}{1} |", amountPayable.ToString("#0.00"), item.CurrencyName);
|
|
|
|
|
|
@@ -1600,7 +1650,7 @@ namespace OASystem.API.Controllers
|
|
}
|
|
}
|
|
else
|
|
else
|
|
{
|
|
{
|
|
- thisPaymentStr += string.Format(@"{0}{1} |","0.00", item.CurrencyName);
|
|
|
|
|
|
+ thisPaymentStr += string.Format(@"{0}{1} |", "0.00", item.CurrencyName);
|
|
}
|
|
}
|
|
|
|
|
|
balancePaymentStr += string.Format(@"{0}{1} |", balancePayment.ToString("#0.00"), item.CurrencyName);
|
|
balancePaymentStr += string.Format(@"{0}{1} |", balancePayment.ToString("#0.00"), item.CurrencyName);
|
|
@@ -1699,7 +1749,7 @@ namespace OASystem.API.Controllers
|
|
string groupNameStr = string.Empty;
|
|
string groupNameStr = string.Empty;
|
|
var groupData = groupDatas.Where(it => it.Id == creditData.DIId).FirstOrDefault();
|
|
var groupData = groupDatas.Where(it => it.Id == creditData.DIId).FirstOrDefault();
|
|
if (groupData != null) groupNameStr = groupData.TeamName;
|
|
if (groupData != null) groupNameStr = groupData.TeamName;
|
|
-
|
|
|
|
|
|
+
|
|
|
|
|
|
string creditTypeStr = string.Empty;
|
|
string creditTypeStr = string.Empty;
|
|
var creditTypeData = creditTypeDatas.Where(it => it.Id == creditData.CTable).FirstOrDefault();
|
|
var creditTypeData = creditTypeDatas.Where(it => it.Id == creditData.CTable).FirstOrDefault();
|
|
@@ -1732,10 +1782,10 @@ namespace OASystem.API.Controllers
|
|
msgContent = $"[{groupNameStr}({creditTypeStr})]费用申请(金额:{CNYPrice.ToString("0.00")} CNY({creditData.PayMoney.ToString("0.00")} {creditCurrency})) {auditStr}!";
|
|
msgContent = $"[{groupNameStr}({creditTypeStr})]费用申请(金额:{CNYPrice.ToString("0.00")} CNY({creditData.PayMoney.ToString("0.00")} {creditCurrency})) {auditStr}!";
|
|
}
|
|
}
|
|
|
|
|
|
-
|
|
|
|
- msgDatas.Add(new {DiId = creditData.DIId, UserId = creditData.CreateUserId, MsgTitle = msgTitle, MsgContent = msgContent });
|
|
|
|
|
|
+
|
|
|
|
+ msgDatas.Add(new { DiId = creditData.DIId, UserId = creditData.CreateUserId, MsgTitle = msgTitle, MsgContent = msgContent });
|
|
}
|
|
}
|
|
-
|
|
|
|
|
|
+
|
|
}
|
|
}
|
|
if (rst == 0)
|
|
if (rst == 0)
|
|
{
|
|
{
|
|
@@ -1902,11 +1952,44 @@ namespace OASystem.API.Controllers
|
|
jw.Msg += "请输入正确的diid";
|
|
jw.Msg += "请输入正确的diid";
|
|
return Ok(jw);
|
|
return Ok(jw);
|
|
}
|
|
}
|
|
- string sql = string.Format("select b.Id,b.Pinyin,b.lastName,b.firstName,b.phone from Grp_TourClientList a, Crm_DeleClient b where a.clientid = b.id and a.isdel = 0 and a.diid = {0}",dto.DIID);
|
|
|
|
- var arr = _sqlSugar.SqlQueryable<SimplClientInfo>(sql).ToList();
|
|
|
|
|
|
+
|
|
|
|
+ var arr = getSimplClientList(dto.DIID);
|
|
jw = JsonView(true, "获取成功!", arr);
|
|
jw = JsonView(true, "获取成功!", arr);
|
|
|
|
|
|
- return Ok(jw);
|
|
|
|
|
|
+ return Ok(jw);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private List<SimplClientInfo> getSimplClientList(int diId) {
|
|
|
|
+ string sql = string.Format("select b.Id,b.Pinyin,b.lastName,b.firstName,b.phone from Grp_TourClientList a, Crm_DeleClient b where a.clientid = b.id and a.isdel = 0 and a.diid = {0}", diId);
|
|
|
|
+ List<SimplClientInfo> arr = _sqlSugar.SqlQueryable<SimplClientInfo>(sql).ToList();
|
|
|
|
+ return arr;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ private string getClientNameStr(List<SimplClientInfo> list, string origin) {
|
|
|
|
+ string result = origin;
|
|
|
|
+
|
|
|
|
+ if (Regex.Match(origin, @"\d+,?").Value.Length > 0) {
|
|
|
|
+ string[] temparr = origin.Split(',');
|
|
|
|
+ string fistrStr = temparr[0];
|
|
|
|
+ int count = temparr.Count();
|
|
|
|
+
|
|
|
|
+ int tempId;
|
|
|
|
+ bool success = int.TryParse(fistrStr, out tempId);
|
|
|
|
+ if (success) {
|
|
|
|
+ SimplClientInfo tempInfo = list.FirstOrDefault(s => s.Id == tempId);
|
|
|
|
+ if (tempInfo != null) {
|
|
|
|
+ if (count > 1)
|
|
|
|
+ {
|
|
|
|
+ result = string.Format(@"{0}{1}等{2}人", tempInfo.LastName, tempInfo.FirstName, count);
|
|
|
|
+ }
|
|
|
|
+ else {
|
|
|
|
+ result = string.Format(@"{0}{1}", tempInfo.LastName, tempInfo.FirstName);
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return result;
|
|
}
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|