|
@@ -1,8 +1,12 @@
|
|
|
-using OASystem.API.OAMethodLib;
|
|
|
+using NPOI.HPSF;
|
|
|
+using OASystem.API.OAMethodLib;
|
|
|
using OASystem.Domain.Dtos.Resource;
|
|
|
using OASystem.Domain.Entities.Groups;
|
|
|
using OASystem.Infrastructure.Repositories.Groups;
|
|
|
+using Org.BouncyCastle.Utilities;
|
|
|
+using Quartz.Util;
|
|
|
using System.Collections.Generic;
|
|
|
+using System.Net.Http.Headers;
|
|
|
|
|
|
namespace OASystem.API.Controllers
|
|
|
{
|
|
@@ -26,13 +30,14 @@ namespace OASystem.API.Controllers
|
|
|
private readonly AirTicketAgentRepository _airTicketAgentRep;
|
|
|
private readonly InvitationOfficialActivityDataRepository _InvitationOfficialActivityDataRep;
|
|
|
private readonly OfficialActivitiesRepository _officialActivitiesRep;
|
|
|
+ private readonly AskDataRepository _askDataRep;
|
|
|
private readonly SqlSugarClient _sqlSugar;
|
|
|
|
|
|
public ResourceController(IMapper mapper, IConfiguration config, SqlSugarClient sqlSugar, CarDataRepository carDataRep,
|
|
|
LocalGuideDataRepository localGuideDataRep, ThreeCodeRepository threeCodeRep,
|
|
|
HotelDataRepository hotelDataRep, ResItemInfoRepository resItemInfoRep, SetDataRepository setDataRepository,
|
|
|
CountryFeeRepository countryFeeRep, SetDataTypeRepository setDataTypeRep, AirTicketAgentRepository airTicketAgentRep,
|
|
|
- InvitationOfficialActivityDataRepository invitationOfficialActivityDataRep, OfficialActivitiesRepository officialActivitiesRep)
|
|
|
+ InvitationOfficialActivityDataRepository invitationOfficialActivityDataRep, OfficialActivitiesRepository officialActivitiesRep, AskDataRepository askDataRep)
|
|
|
{
|
|
|
_mapper = mapper;
|
|
|
_config = config;
|
|
@@ -48,6 +53,7 @@ namespace OASystem.API.Controllers
|
|
|
_airTicketAgentRep = airTicketAgentRep;
|
|
|
_InvitationOfficialActivityDataRep = invitationOfficialActivityDataRep;
|
|
|
_officialActivitiesRep = officialActivitiesRep;
|
|
|
+ _askDataRep = askDataRep;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -1538,7 +1544,11 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
|
throw;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ /// <summary>
|
|
|
+ /// 上传文件
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="file"></param>
|
|
|
+ /// <returns></returns>
|
|
|
[HttpPost]
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> UploadOfficialActivities(IFormFile file)
|
|
@@ -1591,7 +1601,11 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
|
throw;
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
+ /// <summary>
|
|
|
+ /// 删除文件
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
[HttpPost]
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> DelloadOfficialActivities(DelBaseDto dto)
|
|
@@ -1621,9 +1635,61 @@ Inner Join Sys_Department as d With(Nolock) On u.DepId=d.Id Where m.Id={0} ", _m
|
|
|
throw;
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 删除公务出访信息
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> DelOfficialActivities(DelBaseDto dto)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ var res = await _officialActivitiesRep.SoftDeleteByIdAsync<Res_OfficialActivities>(dto.Id.ToString(), dto.DeleteUserId);
|
|
|
+ if (!res)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "删除失败"));
|
|
|
+ }
|
|
|
+ return Ok(JsonView(true, "删除成功!"));
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "程序错误!"));
|
|
|
+ throw;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #region 请示数据库
|
|
|
+ /// <summary>
|
|
|
+ /// 查询请示数据库初始化
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> QueryAskData(QueryAskDataDto dto)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ Result groupData = await _askDataRep.QueryAskData(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;
|
|
|
+ }
|
|
|
+ }
|
|
|
#endregion
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
}
|
|
|
|