|
@@ -17,11 +17,13 @@ using OASystem.API.OAMethodLib.JuHeAPI;
|
|
|
using OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice;
|
|
|
using OASystem.Domain.Dtos.CRM;
|
|
|
using OASystem.Domain.Dtos.FileDto;
|
|
|
+using OASystem.Domain.Dtos.Financial;
|
|
|
using OASystem.Domain.Dtos.Groups;
|
|
|
using OASystem.Domain.Entities.Customer;
|
|
|
using OASystem.Domain.Entities.Financial;
|
|
|
using OASystem.Domain.Entities.Groups;
|
|
|
using OASystem.Domain.ViewModels.Groups;
|
|
|
+using OASystem.Infrastructure.Repositories.Financial;
|
|
|
using OASystem.Infrastructure.Repositories.Groups;
|
|
|
using Quartz.Util;
|
|
|
using SqlSugar.Extensions;
|
|
@@ -89,6 +91,7 @@ namespace OASystem.API.Controllers
|
|
|
private readonly FeeAuditRepository _feeAuditRep;
|
|
|
|
|
|
private readonly VisaCommissionRepository _visaCommissionRep;
|
|
|
+ private readonly ForeignReceivablesRepository _ffrRep; //对外收款账单仓库
|
|
|
|
|
|
public GroupsController(ILogger<GroupsController> logger, IMapper mapper, SqlSugarClient sqlSugar, GrpScheduleRepository grpScheduleRep, DelegationInfoRepository groupRepository,
|
|
|
TaskAssignmentRepository taskAssignmentRep, AirTicketResRepository airTicketResRep, DecreasePaymentsRepository decreasePaymentsRep,
|
|
@@ -98,7 +101,7 @@ namespace OASystem.API.Controllers
|
|
|
GroupCostParameterRepository GroupCostParameterRepository, HotelPriceRepository hotelPriceRep, CustomersRepository customersRep, SetDataRepository setDataRep,
|
|
|
TourClientListRepository tourClientListRep, TeamRateRepository teamRateRep, IHubContext<ChatHub, IChatClient> hubContext, UsersRepository usersRep, IJuHeApiService juHeApi,
|
|
|
InvertedListRepository invertedListRep, VisaFeeInfoRepository visaFeeInfoRep, TicketBlackCodeRepository ticketBlackCodeRep, HotelInquiryRepository hotelInquiryRep,
|
|
|
- ThreeCodeRepository threeCodeRepository, FeeAuditRepository feeAuditRep, VisaCommissionRepository visaCommissionRep)
|
|
|
+ ThreeCodeRepository threeCodeRepository, FeeAuditRepository feeAuditRep, VisaCommissionRepository visaCommissionRep, ForeignReceivablesRepository ffrRep)
|
|
|
{
|
|
|
_logger = logger;
|
|
|
_mapper = mapper;
|
|
@@ -140,6 +143,7 @@ namespace OASystem.API.Controllers
|
|
|
_threeCodeRepository = threeCodeRepository;
|
|
|
_feeAuditRep = feeAuditRep;
|
|
|
_visaCommissionRep = visaCommissionRep;
|
|
|
+ _ffrRep = ffrRep;
|
|
|
}
|
|
|
|
|
|
#region 流程管控
|
|
@@ -577,6 +581,18 @@ namespace OASystem.API.Controllers
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
+ decimal ffrPrice = 0.00M;
|
|
|
+ DateTime? visitDt = null;
|
|
|
+ if (dto.Status == 2)
|
|
|
+ {
|
|
|
+ var groupInfo = await _sqlSugar.Queryable<Grp_DelegationInfo>().FirstAsync(x => x.Id == dto.Id && x.IsDel == 0);
|
|
|
+ if (groupInfo != null)
|
|
|
+ {
|
|
|
+ ffrPrice = groupInfo.PaymentMoney;
|
|
|
+ visitDt = groupInfo.VisitDate.AddDays(-groupInfo.PayDay);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
var groupData = await _groupRepository.GroupOperation(dto);
|
|
|
if (groupData.Code != 0)
|
|
|
{
|
|
@@ -616,12 +632,60 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
//默认创建倒推表
|
|
|
await _invertedListRep._Create(dto.UserId, diId);
|
|
|
+
|
|
|
}
|
|
|
else if (dto.Status == 2)
|
|
|
{
|
|
|
diId = dto.Id;
|
|
|
}
|
|
|
|
|
|
+ #region 团组操作默认添加/修改收款账单
|
|
|
+ if (dto.PayDay > 0 && dto.PaymentMoney > 0)
|
|
|
+ {
|
|
|
+ var ffrInfo = await _sqlSugar.Queryable<Fin_ForeignReceivables>()
|
|
|
+ .Where(x => x.IsDel == 0 &&
|
|
|
+ x.Diid == diId &&
|
|
|
+ x.Remark.Equals("预付款")
|
|
|
+ )
|
|
|
+ .WhereIF(ffrPrice > 0 , x => x.ItemSumPrice == ffrPrice)
|
|
|
+ .WhereIF(visitDt != null, x=> x.CreateTime == visitDt)
|
|
|
+ .FirstAsync();
|
|
|
+
|
|
|
+ ffrInfo.Diid = diId;
|
|
|
+ ffrInfo.PriceName = dto.ClientUnit;
|
|
|
+ ffrInfo.Price = dto.PaymentMoney;
|
|
|
+ ffrInfo.Count = 1;
|
|
|
+ ffrInfo.Unit = $"元";
|
|
|
+ ffrInfo.ItemSumPrice = dto.PaymentMoney;
|
|
|
+ ffrInfo.Rate = 1.0000M;
|
|
|
+ ffrInfo.Currency = 836;
|
|
|
+ ffrInfo.AddingWay = 0;
|
|
|
+ ffrInfo.CreateUserId = dto.UserId;
|
|
|
+ ffrInfo.CreateTime = Convert.ToDateTime(dto.VisitDate).AddDays(-dto.PayDay);
|
|
|
+ ffrInfo.Remark = $"预付款";
|
|
|
+
|
|
|
+ if (ffrInfo == null) //Add
|
|
|
+ {
|
|
|
+ await _sqlSugar.Insertable(ffrInfo).ExecuteCommandAsync();
|
|
|
+ }
|
|
|
+ else //修改
|
|
|
+ {
|
|
|
+ await _sqlSugar.Updateable<Fin_ForeignReceivables>(ffrInfo)
|
|
|
+ .UpdateColumns(x => new
|
|
|
+ {
|
|
|
+ x.PriceName,
|
|
|
+ x.Price,
|
|
|
+ x.ItemSumPrice,
|
|
|
+ x.CreateTime,
|
|
|
+ x.CreateUserId
|
|
|
+ })
|
|
|
+ .WhereColumns(x => x.Id)
|
|
|
+ .ExecuteCommandAsync();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
return Ok(JsonView(true, "操作成功!", diId));
|
|
|
}
|
|
|
catch (Exception ex)
|
|
@@ -658,8 +722,20 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
#endregion
|
|
|
|
|
|
-
|
|
|
_sqlSugar.BeginTran();
|
|
|
+
|
|
|
+ decimal ffrPrice = 0.00M;
|
|
|
+ DateTime? visitDt = null;
|
|
|
+ if (dto.Status == 2)
|
|
|
+ {
|
|
|
+ var groupInfo = await _sqlSugar.Queryable<Grp_DelegationInfo>().FirstAsync(x => x.Id == dto.Id && x.IsDel == 0);
|
|
|
+ if (groupInfo != null)
|
|
|
+ {
|
|
|
+ ffrPrice = groupInfo.PaymentMoney;
|
|
|
+ visitDt = groupInfo.VisitDate.AddDays(-groupInfo.PayDay);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
var _dto = new GroupOperationDto();
|
|
|
_dto = _mapper.Map<GroupProcessOperationDto, GroupOperationDto>(dto);
|
|
|
var groupData = await _groupRepository.GroupOperation(_dto);
|
|
@@ -698,8 +774,10 @@ namespace OASystem.API.Controllers
|
|
|
string content = $"团组[{groupName}(创建人:{createGroupUser})]创建成功,请前往页面进行下一步操作!";
|
|
|
await GeneralMethod.MessageIssueAndNotification(MessageTypeEnum.GroupBusinessOperations, title, content, userIds, diId);
|
|
|
}
|
|
|
- }
|
|
|
|
|
|
+ //默认创建倒推表
|
|
|
+ await _invertedListRep._Create(dto.UserId, diId);
|
|
|
+ }
|
|
|
|
|
|
if (dto.Status == 2)
|
|
|
{
|
|
@@ -719,6 +797,53 @@ namespace OASystem.API.Controllers
|
|
|
}
|
|
|
|
|
|
|
|
|
+ #region 团组操作默认添加/修改收款账单
|
|
|
+ if (dto.PayDay > 0 && dto.PaymentMoney > 0)
|
|
|
+ {
|
|
|
+ var ffrInfo = await _sqlSugar.Queryable<Fin_ForeignReceivables>()
|
|
|
+ .Where(x => x.IsDel == 0 &&
|
|
|
+ x.Diid == diId &&
|
|
|
+ x.Remark.Equals("预付款")
|
|
|
+ )
|
|
|
+ .WhereIF(ffrPrice > 0, x => x.ItemSumPrice == ffrPrice)
|
|
|
+ .WhereIF(visitDt != null, x => x.CreateTime == visitDt)
|
|
|
+ .FirstAsync();
|
|
|
+
|
|
|
+ ffrInfo.Diid = diId;
|
|
|
+ ffrInfo.PriceName = dto.ClientUnit;
|
|
|
+ ffrInfo.Price = dto.PaymentMoney;
|
|
|
+ ffrInfo.Count = 1;
|
|
|
+ ffrInfo.Unit = $"元";
|
|
|
+ ffrInfo.ItemSumPrice = dto.PaymentMoney;
|
|
|
+ ffrInfo.Rate = 1.0000M;
|
|
|
+ ffrInfo.Currency = 836;
|
|
|
+ ffrInfo.AddingWay = 0;
|
|
|
+ ffrInfo.CreateUserId = dto.UserId;
|
|
|
+ ffrInfo.CreateTime = Convert.ToDateTime(dto.VisitDate).AddDays(-dto.PayDay);
|
|
|
+ ffrInfo.Remark = $"预付款";
|
|
|
+
|
|
|
+ if (ffrInfo == null) //Add
|
|
|
+ {
|
|
|
+ await _sqlSugar.Insertable(ffrInfo).ExecuteCommandAsync();
|
|
|
+ }
|
|
|
+ else //修改
|
|
|
+ {
|
|
|
+ await _sqlSugar.Updateable<Fin_ForeignReceivables>(ffrInfo)
|
|
|
+ .UpdateColumns(x => new
|
|
|
+ {
|
|
|
+ x.PriceName,
|
|
|
+ x.Price,
|
|
|
+ x.ItemSumPrice,
|
|
|
+ x.CreateTime,
|
|
|
+ x.CreateUserId
|
|
|
+ })
|
|
|
+ .WhereColumns(x => x.Id)
|
|
|
+ .ExecuteCommandAsync();
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
_sqlSugar.CommitTran();
|
|
|
return Ok(JsonView(true, "添加成功"));
|
|
|
}
|
|
@@ -2345,20 +2470,12 @@ namespace OASystem.API.Controllers
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> AirTicketResById(AirTicketResByIdDto dto)
|
|
|
{
|
|
|
- try
|
|
|
- {
|
|
|
- Result groupData = await _airTicketResRep.AirTicketResById(dto);
|
|
|
- if (groupData.Code != 0)
|
|
|
- {
|
|
|
- return Ok(JsonView(false, groupData.Msg));
|
|
|
- }
|
|
|
- return Ok(JsonView(true, groupData.Msg, groupData.Data));
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
+ Result groupData = await _airTicketResRep.AirTicketResById(dto);
|
|
|
+ if (groupData.Code != 0)
|
|
|
{
|
|
|
- return Ok(JsonView(false, "程序错误!"));
|
|
|
- throw;
|
|
|
+ return Ok(JsonView(false, groupData.Msg));
|
|
|
}
|
|
|
+ return Ok(JsonView(true, groupData.Msg, groupData.Data));
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 机票费用录入操作(Status:1.新增,2.修改)
|
|
@@ -3513,20 +3630,12 @@ namespace OASystem.API.Controllers
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> InvitationOfficialActivitiesList(InvitationOfficialActivitiesListDto dto)
|
|
|
{
|
|
|
- try
|
|
|
- {
|
|
|
- Result groupData = await _InvitationOfficialActivitiesRep.InvitationOfficialActivitiesList(dto);
|
|
|
- if (groupData.Code != 0)
|
|
|
- {
|
|
|
- return Ok(JsonView(false, groupData.Msg));
|
|
|
- }
|
|
|
- return Ok(JsonView(true, groupData.Msg, groupData.Data));
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
+ Result groupData = await _InvitationOfficialActivitiesRep.InvitationOfficialActivitiesList(dto);
|
|
|
+ if (groupData.Code != 0)
|
|
|
{
|
|
|
- return Ok(JsonView(false, "程序错误!"));
|
|
|
- throw;
|
|
|
+ return Ok(JsonView(false, groupData.Msg));
|
|
|
}
|
|
|
+ return Ok(JsonView(true, groupData.Msg, groupData.Data));
|
|
|
}
|
|
|
|
|
|
//
|
|
@@ -3589,34 +3698,26 @@ namespace OASystem.API.Controllers
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> OpInvitationOfficialActivities(OpInvitationOfficialActivitiesDto dto)
|
|
|
{
|
|
|
- try
|
|
|
+ Result groupData = await _InvitationOfficialActivitiesRep.OpInvitationOfficialActivities(dto, _setDataRep.PostCurrencyByDiid);
|
|
|
+ if (groupData.Code != 0)
|
|
|
{
|
|
|
- Result groupData = await _InvitationOfficialActivitiesRep.OpInvitationOfficialActivities(dto, _setDataRep.PostCurrencyByDiid);
|
|
|
- if (groupData.Code != 0)
|
|
|
- {
|
|
|
- return Ok(JsonView(false, groupData.Msg));
|
|
|
- }
|
|
|
-
|
|
|
- #region 应用推送
|
|
|
- try
|
|
|
- {
|
|
|
- int ccpId = groupData.Data.GetType().GetProperty("ccpId").GetValue(groupData.Data, null);
|
|
|
- int sign = groupData.Data.GetType().GetProperty("sign").GetValue(groupData.Data, null);
|
|
|
+ return Ok(JsonView(false, groupData.Msg));
|
|
|
+ }
|
|
|
|
|
|
- await AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(ccpId, sign, QiyeWeChatEnum.GuoJiaoLeaderChat);
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
- {
|
|
|
- }
|
|
|
- #endregion
|
|
|
+ #region 应用推送
|
|
|
+ try
|
|
|
+ {
|
|
|
+ int ccpId = groupData.Data.GetType().GetProperty("ccpId").GetValue(groupData.Data, null);
|
|
|
+ int sign = groupData.Data.GetType().GetProperty("sign").GetValue(groupData.Data, null);
|
|
|
|
|
|
- return Ok(JsonView(true, groupData.Msg, groupData.Data));
|
|
|
+ await AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(ccpId, sign, QiyeWeChatEnum.GuoJiaoLeaderChat);
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
- return Ok(JsonView(false, "程序错误!"));
|
|
|
- throw;
|
|
|
}
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ return Ok(JsonView(true, groupData.Msg, groupData.Data));
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 商邀删除
|
|
@@ -6013,12 +6114,7 @@ namespace OASystem.API.Controllers
|
|
|
{
|
|
|
return Ok(JsonView(false, data.Msg));
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
return Ok(JsonView(true, data.Msg, data.Data));
|
|
|
-
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -6370,7 +6466,8 @@ namespace OASystem.API.Controllers
|
|
|
IsDel = 1,
|
|
|
DeleteUserId = dto.DeleteUserId,
|
|
|
DeleteTime = DateTime.Now.ToString("yyyy-MM-dd HH:mm:ss")
|
|
|
- }).ExecuteCommand();
|
|
|
+ })
|
|
|
+ .ExecuteCommand();
|
|
|
if (resSub < 1)
|
|
|
{
|
|
|
_sqlSugar.RollbackTran();
|
|
@@ -6388,38 +6485,30 @@ namespace OASystem.API.Controllers
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> VisaPriceAddSelect()
|
|
|
{
|
|
|
- try
|
|
|
- {
|
|
|
- //支付方式
|
|
|
- List<Sys_SetData> Payment = _sqlSugar.Queryable<Sys_SetData>().Where(a => a.STid == 14 && a.IsDel == 0).ToList();
|
|
|
- List<SetDataInfoView> _Payment = _mapper.Map<List<SetDataInfoView>>(Payment);
|
|
|
+ //支付方式
|
|
|
+ List<Sys_SetData> Payment = _sqlSugar.Queryable<Sys_SetData>().Where(a => a.STid == 14 && a.IsDel == 0).ToList();
|
|
|
+ List<SetDataInfoView> _Payment = _mapper.Map<List<SetDataInfoView>>(Payment);
|
|
|
|
|
|
- //币种
|
|
|
- List<Sys_SetData> CurrencyList = _sqlSugar.Queryable<Sys_SetData>().Where(a => a.STid == 66 && a.IsDel == 0).ToList();
|
|
|
- List<SetDataInfoView> _CurrencyList = _mapper.Map<List<SetDataInfoView>>(CurrencyList);
|
|
|
+ //币种
|
|
|
+ List<Sys_SetData> CurrencyList = _sqlSugar.Queryable<Sys_SetData>().Where(a => a.STid == 66 && a.IsDel == 0).ToList();
|
|
|
+ List<SetDataInfoView> _CurrencyList = _mapper.Map<List<SetDataInfoView>>(CurrencyList);
|
|
|
|
|
|
- //乘客类型
|
|
|
- List<Sys_SetData> PassengerType = _sqlSugar.Queryable<Sys_SetData>().Where(a => a.STid == 69 && a.IsDel == 0).ToList();
|
|
|
- List<SetDataInfoView> _PassengerType = _mapper.Map<List<SetDataInfoView>>(PassengerType);
|
|
|
+ //乘客类型
|
|
|
+ List<Sys_SetData> PassengerType = _sqlSugar.Queryable<Sys_SetData>().Where(a => a.STid == 69 && a.IsDel == 0).ToList();
|
|
|
+ List<SetDataInfoView> _PassengerType = _mapper.Map<List<SetDataInfoView>>(PassengerType);
|
|
|
|
|
|
- //卡类型
|
|
|
- List<Sys_SetData> BankCard = _sqlSugar.Queryable<Sys_SetData>().Where(a => a.STid == 15 && a.IsDel == 0).ToList();
|
|
|
- List<SetDataInfoView> _BankCard = _mapper.Map<List<SetDataInfoView>>(BankCard);
|
|
|
+ //卡类型
|
|
|
+ List<Sys_SetData> BankCard = _sqlSugar.Queryable<Sys_SetData>().Where(a => a.STid == 15 && a.IsDel == 0).ToList();
|
|
|
+ List<SetDataInfoView> _BankCard = _mapper.Map<List<SetDataInfoView>>(BankCard);
|
|
|
|
|
|
- var data = new
|
|
|
- {
|
|
|
- Payment = _Payment,
|
|
|
- CurrencyList = _CurrencyList,
|
|
|
- PassengerType = _PassengerType,
|
|
|
- BankCard = _BankCard
|
|
|
- };
|
|
|
- return Ok(JsonView(true, "查询成功!", data));
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
+ var data = new
|
|
|
{
|
|
|
- return Ok(JsonView(false, "程序错误!"));
|
|
|
- throw;
|
|
|
- }
|
|
|
+ Payment = _Payment,
|
|
|
+ CurrencyList = _CurrencyList,
|
|
|
+ PassengerType = _PassengerType,
|
|
|
+ BankCard = _BankCard
|
|
|
+ };
|
|
|
+ return Ok(JsonView(true, "查询成功!", data));
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -6431,33 +6520,26 @@ namespace OASystem.API.Controllers
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> OpVisaPrice(OpVisaPriceDto dto)
|
|
|
{
|
|
|
- try
|
|
|
+ Result groupData = await _visaPriceRep.OpVisaPrice(dto);
|
|
|
+ if (groupData.Code != 0)
|
|
|
{
|
|
|
- Result groupData = await _visaPriceRep.OpVisaPrice(dto);
|
|
|
- if (groupData.Code != 0)
|
|
|
- {
|
|
|
- return Ok(JsonView(false, groupData.Msg));
|
|
|
- }
|
|
|
-
|
|
|
- #region 应用推送
|
|
|
- try
|
|
|
- {
|
|
|
- int ccpId = groupData.Data.GetType().GetProperty("ccpId").GetValue(groupData.Data, null);
|
|
|
- int sign = groupData.Data.GetType().GetProperty("sign").GetValue(groupData.Data, null);
|
|
|
+ return Ok(JsonView(false, groupData.Msg));
|
|
|
+ }
|
|
|
|
|
|
- await AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(ccpId, sign, QiyeWeChatEnum.GuoJiaoLeaderChat);
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
- {
|
|
|
- }
|
|
|
- #endregion
|
|
|
+ #region 应用推送
|
|
|
+ try
|
|
|
+ {
|
|
|
+ int ccpId = groupData.Data.GetType().GetProperty("ccpId").GetValue(groupData.Data, null);
|
|
|
+ int sign = groupData.Data.GetType().GetProperty("sign").GetValue(groupData.Data, null);
|
|
|
|
|
|
- return Ok(JsonView(true, groupData.Msg, groupData.Data));
|
|
|
+ await AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(ccpId, sign, QiyeWeChatEnum.GuoJiaoLeaderChat);
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
- return Ok(JsonView(false, ex.Message));
|
|
|
}
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ return Ok(JsonView(true, groupData.Msg, groupData.Data));
|
|
|
}
|
|
|
#endregion
|
|
|
|
|
@@ -6612,19 +6694,13 @@ namespace OASystem.API.Controllers
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> QueryCarTouristGuideGroundByDiId(CarTouristGuideGroundDto dto)
|
|
|
{
|
|
|
- try
|
|
|
- {
|
|
|
- Result groupData = await _carTouristGuideGroundRep.QueryCarTouristGuideGroundByDiId(dto);
|
|
|
- if (groupData.Code != 0)
|
|
|
- {
|
|
|
- return Ok(JsonView(false, groupData.Msg));
|
|
|
- }
|
|
|
- return Ok(JsonView(true, groupData.Msg, groupData.Data));
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
+ Result groupData = await _carTouristGuideGroundRep.QueryCarTouristGuideGroundByDiId(dto);
|
|
|
+ if (groupData.Code != 0)
|
|
|
{
|
|
|
- return Ok(JsonView(false, ex.Message));
|
|
|
+ return Ok(JsonView(false, groupData.Msg));
|
|
|
}
|
|
|
+ return Ok(JsonView(true, groupData.Msg, groupData.Data));
|
|
|
+
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 根据op费用Id查询单条数据及c表数据
|
|
@@ -6730,20 +6806,13 @@ namespace OASystem.API.Controllers
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> OpCarTouristGuideGround(OpCarTouristGuideGroundDto dto)
|
|
|
{
|
|
|
- try
|
|
|
- {
|
|
|
- Result groupData = await _carTouristGuideGroundRep.OpCarTouristGuideGround(dto);
|
|
|
- if (groupData.Code != 0)
|
|
|
- {
|
|
|
- return Ok(JsonView(false, groupData.Msg));
|
|
|
- }
|
|
|
-
|
|
|
- return Ok(JsonView(true, groupData.Msg, groupData.Data));
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
+ Result groupData = await _carTouristGuideGroundRep.OpCarTouristGuideGround(dto);
|
|
|
+ if (groupData.Code != 0)
|
|
|
{
|
|
|
- return Ok(JsonView(false, ex.Message));
|
|
|
+ return Ok(JsonView(false, groupData.Msg));
|
|
|
}
|
|
|
+
|
|
|
+ return Ok(JsonView(true, groupData.Msg, groupData.Data));
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 填写费用详细页面初始化绑定
|
|
@@ -6768,6 +6837,7 @@ namespace OASystem.API.Controllers
|
|
|
return Ok(JsonView(false, ex.Message));
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 根据op费用Id查询详细数据
|
|
|
/// </summary>
|
|
@@ -6791,6 +6861,7 @@ namespace OASystem.API.Controllers
|
|
|
return Ok(JsonView(false, ex.Message));
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// OP费用录入填写详情
|
|
|
/// </summary>
|
|
@@ -10237,41 +10308,32 @@ ORDER by gctggrc.id DESC
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> PostHotelReservationsCreateCheckVolumeNo(HotelReservationBasicsDataInitDto _dto)
|
|
|
{
|
|
|
- try
|
|
|
- {
|
|
|
- #region 参数验证
|
|
|
- if (_dto.UserId < 1) return Ok(JsonView(false, "员工Id为空"));
|
|
|
- if (_dto.PageId < 1) _dto.PageId = 28; //酒店预定Id
|
|
|
- if (_dto.DiId < 1) return Ok(JsonView(false, "团组Id为空"));
|
|
|
-
|
|
|
- PageFunAuthViewBase pageFunAuthView = new PageFunAuthViewBase();
|
|
|
-
|
|
|
- #region 页面操作权限验证
|
|
|
- pageFunAuthView = await GeneralMethod.PostUserPageFuncDatas(_dto.UserId, _dto.PageId);
|
|
|
+ #region 参数验证
|
|
|
+ if (_dto.UserId < 1) return Ok(JsonView(false, "员工Id为空"));
|
|
|
+ if (_dto.PageId < 1) _dto.PageId = 28; //酒店预定Id
|
|
|
+ if (_dto.DiId < 1) return Ok(JsonView(false, "团组Id为空"));
|
|
|
|
|
|
- if (pageFunAuthView.CheckAuth == 0) return Ok(JsonView(false, "您没有查看权限!"));
|
|
|
- #endregion
|
|
|
+ PageFunAuthViewBase pageFunAuthView = new PageFunAuthViewBase();
|
|
|
|
|
|
- #region 团组操作权限验证 76 酒店预定模块
|
|
|
- var groupAuthView = await GeneralMethod.PostGroupOperationAuth(_dto.DiId, _dto.UserId, 76);
|
|
|
- if (groupAuthView.Code != 0) return Ok(JsonView(false, groupAuthView.Msg));
|
|
|
- #endregion
|
|
|
+ #region 页面操作权限验证
|
|
|
+ pageFunAuthView = await GeneralMethod.PostUserPageFuncDatas(_dto.UserId, _dto.PageId);
|
|
|
|
|
|
- #endregion
|
|
|
+ if (pageFunAuthView.CheckAuth == 0) return Ok(JsonView(false, "您没有查看权限!"));
|
|
|
+ #endregion
|
|
|
|
|
|
- Result data = await _hotelPriceRep._CreateCheckVolumeNo(_dto.DiId);
|
|
|
- if (data.Code != 0)
|
|
|
- {
|
|
|
- return Ok(JsonView(false, data.Msg));
|
|
|
- }
|
|
|
- return Ok(JsonView(true, data.Msg, data.Data));
|
|
|
+ #region 团组操作权限验证 76 酒店预定模块
|
|
|
+ var groupAuthView = await GeneralMethod.PostGroupOperationAuth(_dto.DiId, _dto.UserId, 76);
|
|
|
+ if (groupAuthView.Code != 0) return Ok(JsonView(false, groupAuthView.Msg));
|
|
|
+ #endregion
|
|
|
|
|
|
+ #endregion
|
|
|
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
+ Result data = await _hotelPriceRep._CreateCheckVolumeNo(_dto.DiId);
|
|
|
+ if (data.Code != 0)
|
|
|
{
|
|
|
- return Ok(JsonView(false, ex.Message));
|
|
|
+ return Ok(JsonView(false, data.Msg));
|
|
|
}
|
|
|
+ return Ok(JsonView(true, data.Msg, data.Data));
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -10415,7 +10477,6 @@ ORDER by gctggrc.id DESC
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> PostHotelReservationsDel(HotelReservationsDelDto _dto)
|
|
|
{
|
|
|
-
|
|
|
#region 参数验证
|
|
|
if (_dto.UserId < 1) return Ok(JsonView(false, "员工Id为空"));
|
|
|
if (_dto.PageId < 1) _dto.PageId = 28; //酒店预定Id
|
|
@@ -10439,7 +10500,6 @@ ORDER by gctggrc.id DESC
|
|
|
#endregion
|
|
|
|
|
|
return Ok(await _hotelPriceRep._Del(_dto.Id, _dto.UserId));
|
|
|
-
|
|
|
}
|
|
|
|
|
|
/// <summary>
|
|
@@ -12140,33 +12200,26 @@ ORDER by gctggrc.id DESC
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> OpCustomers(OpCustomersDto dto)
|
|
|
{
|
|
|
- try
|
|
|
+ Result groupData = await _customersRep.OpCustomers(dto);
|
|
|
+ if (groupData.Code != 0)
|
|
|
{
|
|
|
- Result groupData = await _customersRep.OpCustomers(dto);
|
|
|
- if (groupData.Code != 0)
|
|
|
- {
|
|
|
- return Ok(JsonView(false, groupData.Msg));
|
|
|
- }
|
|
|
-
|
|
|
- #region 应用推送
|
|
|
- try
|
|
|
- {
|
|
|
- int ccpId = groupData.Data.GetType().GetProperty("ccpId").GetValue(groupData.Data, null);
|
|
|
- int sign = groupData.Data.GetType().GetProperty("sign").GetValue(groupData.Data, null);
|
|
|
+ return Ok(JsonView(false, groupData.Msg));
|
|
|
+ }
|
|
|
|
|
|
- await AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(ccpId, sign, QiyeWeChatEnum.GuoJiaoLeaderChat);
|
|
|
- }
|
|
|
- catch (Exception ex)
|
|
|
- {
|
|
|
- }
|
|
|
- #endregion
|
|
|
+ #region 应用推送
|
|
|
+ try
|
|
|
+ {
|
|
|
+ int ccpId = groupData.Data.GetType().GetProperty("ccpId").GetValue(groupData.Data, null);
|
|
|
+ int sign = groupData.Data.GetType().GetProperty("sign").GetValue(groupData.Data, null);
|
|
|
|
|
|
- return Ok(JsonView(true, groupData.Msg, groupData.Data));
|
|
|
+ await AppNoticeLibrary.SendChatMsg_GroupStatus_ApplyFee(ccpId, sign, QiyeWeChatEnum.GuoJiaoLeaderChat);
|
|
|
}
|
|
|
catch (Exception ex)
|
|
|
{
|
|
|
- return Ok(JsonView(false, ex.Message));
|
|
|
}
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ return Ok(JsonView(true, groupData.Msg, groupData.Data));
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 保险文件上传
|