|
@@ -32,12 +32,13 @@ namespace OASystem.API.Controllers
|
|
private readonly OfficialActivitiesRepository _officialActivitiesRep;
|
|
private readonly OfficialActivitiesRepository _officialActivitiesRep;
|
|
private readonly AskDataRepository _askDataRep;
|
|
private readonly AskDataRepository _askDataRep;
|
|
private readonly SqlSugarClient _sqlSugar;
|
|
private readonly SqlSugarClient _sqlSugar;
|
|
|
|
+ private readonly TicketBlackCodeRepository _ticketBlackCodeRep;
|
|
|
|
|
|
public ResourceController(IMapper mapper, IConfiguration config, SqlSugarClient sqlSugar, CarDataRepository carDataRep,
|
|
public ResourceController(IMapper mapper, IConfiguration config, SqlSugarClient sqlSugar, CarDataRepository carDataRep,
|
|
LocalGuideDataRepository localGuideDataRep, ThreeCodeRepository threeCodeRep,
|
|
LocalGuideDataRepository localGuideDataRep, ThreeCodeRepository threeCodeRep,
|
|
HotelDataRepository hotelDataRep, ResItemInfoRepository resItemInfoRep, SetDataRepository setDataRepository,
|
|
HotelDataRepository hotelDataRep, ResItemInfoRepository resItemInfoRep, SetDataRepository setDataRepository,
|
|
CountryFeeRepository countryFeeRep, SetDataTypeRepository setDataTypeRep, AirTicketAgentRepository airTicketAgentRep,
|
|
CountryFeeRepository countryFeeRep, SetDataTypeRepository setDataTypeRep, AirTicketAgentRepository airTicketAgentRep,
|
|
- InvitationOfficialActivityDataRepository invitationOfficialActivityDataRep, OfficialActivitiesRepository officialActivitiesRep, AskDataRepository askDataRep)
|
|
|
|
|
|
+ InvitationOfficialActivityDataRepository invitationOfficialActivityDataRep, OfficialActivitiesRepository officialActivitiesRep, AskDataRepository askDataRep, TicketBlackCodeRepository ticketBlackCodeRep)
|
|
{
|
|
{
|
|
_mapper = mapper;
|
|
_mapper = mapper;
|
|
_config = config;
|
|
_config = config;
|
|
@@ -54,6 +55,7 @@ namespace OASystem.API.Controllers
|
|
_InvitationOfficialActivityDataRep = invitationOfficialActivityDataRep;
|
|
_InvitationOfficialActivityDataRep = invitationOfficialActivityDataRep;
|
|
_officialActivitiesRep = officialActivitiesRep;
|
|
_officialActivitiesRep = officialActivitiesRep;
|
|
_askDataRep = askDataRep;
|
|
_askDataRep = askDataRep;
|
|
|
|
+ _ticketBlackCodeRep=ticketBlackCodeRep;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -1821,6 +1823,106 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
#endregion
|
|
|
|
+
|
|
|
|
+ #region 机票黑屏代码
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 根据团组Id查询黑屏代码列表
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dto"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPost]
|
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
|
+ public async Task<IActionResult> QueryTicketBlackCodeByDiId(QueryTicketBlackCodeByDiIdDto dto)
|
|
|
|
+ {
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ Result groupData = await _ticketBlackCodeRep.QueryTicketBlackCodeByDiId(dto);
|
|
|
|
+ if (groupData.Code != 0)
|
|
|
|
+ {
|
|
|
|
+ return Ok(JsonView(false, groupData.Msg));
|
|
|
|
+ }
|
|
|
|
+ return Ok(JsonView(true, groupData.Msg, groupData.Data));
|
|
|
|
+ }
|
|
|
|
+ catch (Exception ex)
|
|
|
|
+ {
|
|
|
|
+ return Ok(JsonView(false, "程序错误!"));
|
|
|
|
+ throw;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 根据黑屏代码数据Id查询信息
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dto"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPost]
|
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
|
+ public async Task<IActionResult> QueryTicketBlackCodeById(QueryTicketBlackCodeByIdDto dto)
|
|
|
|
+ {
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ Result groupData = await _ticketBlackCodeRep.QueryTicketBlackCodeById(dto);
|
|
|
|
+ if (groupData.Code != 0)
|
|
|
|
+ {
|
|
|
|
+ return Ok(JsonView(false, groupData.Msg));
|
|
|
|
+ }
|
|
|
|
+ return Ok(JsonView(true, groupData.Msg, groupData.Data));
|
|
|
|
+ }
|
|
|
|
+ catch (Exception ex)
|
|
|
|
+ {
|
|
|
|
+ return Ok(JsonView(false, "程序错误!"));
|
|
|
|
+ throw;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 黑屏代码操作(Status:1.新增,2.修改)
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dto"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPost]
|
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
|
+ public async Task<IActionResult> OpTicketBlackCode(OpTicketBlackCodeDto dto)
|
|
|
|
+ {
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ Result groupData = await _ticketBlackCodeRep.OpTicketBlackCode(dto);
|
|
|
|
+ if (groupData.Code != 0)
|
|
|
|
+ {
|
|
|
|
+ return Ok(JsonView(false, groupData.Msg));
|
|
|
|
+ }
|
|
|
|
+ return Ok(JsonView(true, groupData.Msg, groupData.Data));
|
|
|
|
+ }
|
|
|
|
+ catch (Exception ex)
|
|
|
|
+ {
|
|
|
|
+ return Ok(JsonView(false, "程序错误!"));
|
|
|
|
+ throw;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 删除黑屏代码
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dto"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPost]
|
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
|
+ public async Task<IActionResult> DelTicketBlackCode(DelBaseDto dto)
|
|
|
|
+ {
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ var res = await _ticketBlackCodeRep.SoftDeleteByIdAsync<Air_TicketBlackCode>(dto.Id.ToString(), dto.DeleteUserId);
|
|
|
|
+ if (!res)
|
|
|
|
+ {
|
|
|
|
+ return Ok(JsonView(false, "删除失败"));
|
|
|
|
+ }
|
|
|
|
+ return Ok(JsonView(true, "删除成功!"));
|
|
|
|
+ }
|
|
|
|
+ catch (Exception ex)
|
|
|
|
+ {
|
|
|
|
+ return Ok(JsonView(false, "程序错误!"));
|
|
|
|
+ throw;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ #endregion
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|