|
@@ -48,6 +48,7 @@ namespace OASystem.API.Controllers
|
|
private readonly DelegationEnDataRepository _delegationEnDataRep;
|
|
private readonly DelegationEnDataRepository _delegationEnDataRep;
|
|
private readonly DelegationVisaRepository _delegationVisaRep;
|
|
private readonly DelegationVisaRepository _delegationVisaRep;
|
|
private readonly VisaPriceRepository _visaPriceRep;
|
|
private readonly VisaPriceRepository _visaPriceRep;
|
|
|
|
+ private readonly CarTouristGuideGroundRepository _carTouristGuideGroundRep;
|
|
private readonly MessageRepository _message;
|
|
private readonly MessageRepository _message;
|
|
private readonly SqlSugarClient _sqlSugar;
|
|
private readonly SqlSugarClient _sqlSugar;
|
|
private string url;
|
|
private string url;
|
|
@@ -58,7 +59,7 @@ namespace OASystem.API.Controllers
|
|
public GroupsController(IMapper mapper, SqlSugarClient sqlSugar, GrpScheduleRepository grpScheduleRep, DelegationInfoRepository groupRepository,
|
|
public GroupsController(IMapper mapper, SqlSugarClient sqlSugar, GrpScheduleRepository grpScheduleRep, DelegationInfoRepository groupRepository,
|
|
TaskAssignmentRepository taskAssignmentRep, AirTicketResRepository airTicketResRep, DecreasePaymentsRepository decreasePaymentsRep,
|
|
TaskAssignmentRepository taskAssignmentRep, AirTicketResRepository airTicketResRep, DecreasePaymentsRepository decreasePaymentsRep,
|
|
InvitationOfficialActivitiesRepository InvitationOfficialActivitiesRep, DelegationEnDataRepository delegationEnDataRep, EnterExitCostRepository enterExitCostRep
|
|
InvitationOfficialActivitiesRepository InvitationOfficialActivitiesRep, DelegationEnDataRepository delegationEnDataRep, EnterExitCostRepository enterExitCostRep
|
|
- , DelegationVisaRepository delegationVisaRep, MessageRepository message,VisaPriceRepository visaPriceRep)
|
|
|
|
|
|
+ , DelegationVisaRepository delegationVisaRep, MessageRepository message,VisaPriceRepository visaPriceRep,CarTouristGuideGroundRepository carTouristGuideGroundRep)
|
|
{
|
|
{
|
|
_mapper = mapper;
|
|
_mapper = mapper;
|
|
_grpScheduleRep = grpScheduleRep;
|
|
_grpScheduleRep = grpScheduleRep;
|
|
@@ -79,6 +80,7 @@ namespace OASystem.API.Controllers
|
|
_delegationVisaRep = delegationVisaRep;
|
|
_delegationVisaRep = delegationVisaRep;
|
|
_message = message;
|
|
_message = message;
|
|
_visaPriceRep= visaPriceRep;
|
|
_visaPriceRep= visaPriceRep;
|
|
|
|
+ _carTouristGuideGroundRep= carTouristGuideGroundRep;
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
@@ -2957,5 +2959,98 @@ namespace OASystem.API.Controllers
|
|
}
|
|
}
|
|
}
|
|
}
|
|
#endregion
|
|
#endregion
|
|
|
|
+
|
|
|
|
+ #region op费用录入
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 根据diid查询op费用列表
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dto"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPost]
|
|
|
|
+ [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)
|
|
|
|
+ {
|
|
|
|
+ return Ok(JsonView(false, ex.Message));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 根据op费用Id查询单条数据及c表数据
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dto"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPost]
|
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
|
+ public async Task<IActionResult> QueryCarTouristGuideGroundById(CarTouristGuideGroundIdDto dto)
|
|
|
|
+ {
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ Grp_CarTouristGuideGroundReservations groupData = await _sqlSugar.Queryable<Grp_CarTouristGuideGroundReservations>().FirstAsync(a=>a.Id==dto.Id && a.IsDel==0);
|
|
|
|
+ return Ok(JsonView(true, "查询成功!", groupData));
|
|
|
|
+ }
|
|
|
|
+ catch (Exception ex)
|
|
|
|
+ {
|
|
|
|
+ return Ok(JsonView(false, "程序错误!"));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// op费用删除
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dto"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPost]
|
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
|
+ public async Task<IActionResult> DelCarTouristGuideGround(DelBaseDto dto)
|
|
|
|
+ {
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ var res = await _carTouristGuideGroundRep.SoftDeleteByIdAsync<Grp_CarTouristGuideGroundReservations>(dto.Id.ToString(), dto.DeleteUserId);
|
|
|
|
+ if (!res)
|
|
|
|
+ {
|
|
|
|
+ return Ok(JsonView(false, "删除失败"));
|
|
|
|
+ }
|
|
|
|
+ return Ok(JsonView(true, "删除成功!"));
|
|
|
|
+ }
|
|
|
|
+ catch (Exception ex)
|
|
|
|
+ {
|
|
|
|
+ return Ok(JsonView(false, "程序错误!"));
|
|
|
|
+ throw;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// op费用录入操作(Status:1.新增,2.修改)
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dto"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPost]
|
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
|
+ public async Task<IActionResult> OpCarTouristGuideGround(OpCarTouristGuideGroundDto dto)
|
|
|
|
+ {
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ Result groupData = await _visaPriceRep.OpVisaPrice(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, ex.Message));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ #endregion
|
|
}
|
|
}
|
|
}
|
|
}
|