|
@@ -36,12 +36,13 @@ namespace OASystem.API.Controllers
|
|
private readonly AirTicketResRepository _airTicketResRep;
|
|
private readonly AirTicketResRepository _airTicketResRep;
|
|
private readonly DecreasePaymentsRepository _decreasePaymentsRep;
|
|
private readonly DecreasePaymentsRepository _decreasePaymentsRep;
|
|
private readonly InvitationOfficialActivitiesRepository _InvitationOfficialActivitiesRep;
|
|
private readonly InvitationOfficialActivitiesRepository _InvitationOfficialActivitiesRep;
|
|
|
|
+ private readonly DelegationEnDataRepository _delegationEnDataRep;
|
|
private readonly SqlSugarClient _sqlSugar;
|
|
private readonly SqlSugarClient _sqlSugar;
|
|
private string url;
|
|
private string url;
|
|
private string path;
|
|
private string path;
|
|
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)
|
|
|
|
|
|
+ InvitationOfficialActivitiesRepository InvitationOfficialActivitiesRep, DelegationEnDataRepository delegationEnDataRep)
|
|
{
|
|
{
|
|
_mapper = mapper;
|
|
_mapper = mapper;
|
|
_grpScheduleRep = grpScheduleRep;
|
|
_grpScheduleRep = grpScheduleRep;
|
|
@@ -57,6 +58,7 @@ namespace OASystem.API.Controllers
|
|
}
|
|
}
|
|
_decreasePaymentsRep = decreasePaymentsRep;
|
|
_decreasePaymentsRep = decreasePaymentsRep;
|
|
_InvitationOfficialActivitiesRep = InvitationOfficialActivitiesRep;
|
|
_InvitationOfficialActivitiesRep = InvitationOfficialActivitiesRep;
|
|
|
|
+ _delegationEnDataRep = delegationEnDataRep;
|
|
}
|
|
}
|
|
|
|
|
|
#region 流程管控
|
|
#region 流程管控
|
|
@@ -1847,6 +1849,79 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
#endregion
|
|
#endregion
|
|
|
|
|
|
-
|
|
|
|
|
|
+ #region 团组英文资料
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 查询团组英文所有资料
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dto"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPost]
|
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
|
+ public async Task<IActionResult> QueryDelegationEnData(QueryDelegationEnDataDto dto)
|
|
|
|
+ {
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ List<Grp_DelegationEnData> grp_DelegationEns = await _sqlSugar.Queryable<Grp_DelegationEnData>().Where(a => a.IsDel == 0 && a.Area==dto.Area && a.Job==dto.Job).ToListAsync();
|
|
|
|
+ if (grp_DelegationEns.Count == 0)
|
|
|
|
+ {
|
|
|
|
+ return Ok(JsonView(true, "暂无数据!", grp_DelegationEns));
|
|
|
|
+ }
|
|
|
|
+ return Ok(JsonView(true, "查询成功!", grp_DelegationEns));
|
|
|
|
+ }
|
|
|
|
+ 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> OpDelegationEnData(OpDelegationEnDataDto dto)
|
|
|
|
+ {
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ Result groupData = await _delegationEnDataRep.OpDelegationEnData(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> DelDelegationEnData(DelBaseDto dto)
|
|
|
|
+ {
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ var res = await _delegationEnDataRep.SoftDeleteByIdAsync<Grp_DelegationEnData>(dto.Id.ToString(), dto.DeleteUserId);
|
|
|
|
+ if (!res)
|
|
|
|
+ {
|
|
|
|
+ return Ok(JsonView(false, "删除失败"));
|
|
|
|
+ }
|
|
|
|
+ return Ok(JsonView(true, "删除成功!"));
|
|
|
|
+ }
|
|
|
|
+ catch (Exception ex)
|
|
|
|
+ {
|
|
|
|
+ return Ok(JsonView(false, "程序错误!"));
|
|
|
|
+ throw;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+ #endregion
|
|
}
|
|
}
|
|
}
|
|
}
|