|
@@ -25,12 +25,13 @@ namespace OASystem.API.Controllers
|
|
|
private readonly SqlSugarClient _sqlSugar;
|
|
|
private readonly SetDataTypeRepository _setDataTypeRep;
|
|
|
private readonly DailyFeePaymentRepository _daiRep; //日付申请仓库
|
|
|
- private readonly TeamRateRepository _teamRateRep; //团组汇率仓库
|
|
|
+ private readonly TeamRateRepository _teamRateRep; //团组汇率仓库
|
|
|
+ private readonly ForeignReceivablesRepository _ForForeignReceivablesRep; //对外收款账单仓库
|
|
|
|
|
|
/// <summary>
|
|
|
/// 初始化
|
|
|
/// </summary>
|
|
|
- public FinancialController(IMapper mapper, IConfiguration configuration, DailyFeePaymentRepository daiRep, SqlSugarClient sqlSugar, SetDataTypeRepository setDataTypeRep, TeamRateRepository teamRateRep)
|
|
|
+ public FinancialController(IMapper mapper, IConfiguration configuration, DailyFeePaymentRepository daiRep, SqlSugarClient sqlSugar, SetDataTypeRepository setDataTypeRep, TeamRateRepository teamRateRep, ForeignReceivablesRepository ForForeignReceivablesRep)
|
|
|
{
|
|
|
_mapper = mapper;
|
|
|
_config = configuration;
|
|
@@ -38,6 +39,7 @@ namespace OASystem.API.Controllers
|
|
|
_sqlSugar = sqlSugar;
|
|
|
_setDataTypeRep = setDataTypeRep;
|
|
|
_teamRateRep = teamRateRep;
|
|
|
+ _ForForeignReceivablesRep = ForForeignReceivablesRep;
|
|
|
}
|
|
|
|
|
|
#region 日付申请
|
|
@@ -104,6 +106,7 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
return Ok(JsonView(result.Data));
|
|
|
}
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 日付申请 添加
|
|
|
/// </summary>
|
|
@@ -294,17 +297,42 @@ namespace OASystem.API.Controllers
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ ///// <summary>
|
|
|
+ ///// 团组汇率 changge
|
|
|
+ ///// </summary>
|
|
|
+ ///// <returns></returns>
|
|
|
+ //[HttpPost]
|
|
|
+ //[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ //public async Task<IActionResult> ChangeGroupRateInfo()
|
|
|
+ //{
|
|
|
+ // try
|
|
|
+ // {
|
|
|
+ // Result teamRateData = await _teamRateRep.GetGroupRateChangeData();
|
|
|
+ // if (teamRateData.Code != 0)
|
|
|
+ // {
|
|
|
+ // return Ok(JsonView(false, teamRateData.Msg));
|
|
|
+ // }
|
|
|
+ // return Ok(JsonView(true, teamRateData.Msg, teamRateData.Data));
|
|
|
+ // }
|
|
|
+ // catch (Exception ex)
|
|
|
+ // {
|
|
|
+ // return Ok(JsonView(false, ex.Message));
|
|
|
+ // throw;
|
|
|
+ // }
|
|
|
+ //}
|
|
|
+
|
|
|
/// <summary>
|
|
|
- /// 团组汇率 changge
|
|
|
+ /// 团组汇率 Select汇率详情
|
|
|
/// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
/// <returns></returns>
|
|
|
[HttpPost]
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
- public async Task<IActionResult> ChangeGroupRateInfo()
|
|
|
+ public async Task<IActionResult> GetGroupRateInfo(TeamRateInfoDto dto)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- Result teamRateData = await _teamRateRep.GetGroupRateChangeData();
|
|
|
+ Result teamRateData = await _teamRateRep.GetGroupRateInfoByDiid(dto);
|
|
|
if (teamRateData.Code != 0)
|
|
|
{
|
|
|
return Ok(JsonView(false, teamRateData.Msg));
|
|
@@ -318,18 +346,19 @@ namespace OASystem.API.Controllers
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+
|
|
|
/// <summary>
|
|
|
- /// 团组汇率 Select汇率详情
|
|
|
+ /// 团组汇率 添加 or 更新
|
|
|
/// </summary>
|
|
|
/// <param name="dto"></param>
|
|
|
/// <returns></returns>
|
|
|
[HttpPost]
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
- public async Task<IActionResult> GetGroupRateInfo(TeamRateInfoDto dto)
|
|
|
+ public async Task<IActionResult> PostGroupRateUpdate(TeamRateUpdateDto dto)
|
|
|
{
|
|
|
try
|
|
|
{
|
|
|
- Result teamRateData = await _teamRateRep.GetGroupRateInfoByDiid(dto);
|
|
|
+ Result teamRateData = await _teamRateRep.PostGroupRateUpdate(dto);
|
|
|
if (teamRateData.Code != 0)
|
|
|
{
|
|
|
return Ok(JsonView(false, teamRateData.Msg));
|
|
@@ -344,5 +373,59 @@ namespace OASystem.API.Controllers
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
+
|
|
|
+ #region 对外收款账单
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 对外收款账单 Select数据源(团组名,币种,汇款方式)
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> GetForeignReceivablesDataSources()
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ Result ffrData = await _ForForeignReceivablesRep.GetDataSource();
|
|
|
+ if (ffrData.Code != 0)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, ffrData.Msg));
|
|
|
+ }
|
|
|
+ return Ok(JsonView(true, ffrData.Msg, ffrData.Data));
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, ex.Message));
|
|
|
+ throw;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
+ /// <summary>
|
|
|
+ /// 对外收款账单
|
|
|
+ /// 账单详情
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="dto"></param>
|
|
|
+ /// <returns></returns>
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> GetGroupReceivablesInfoByDiId(ForForeignReceivablesInfoDto dto)
|
|
|
+ {
|
|
|
+ try
|
|
|
+ {
|
|
|
+ Result ffrData = await _ForForeignReceivablesRep.GetGroupReceivablesInfoByDiId(dto);
|
|
|
+ if (ffrData.Code != 0)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, ffrData.Msg));
|
|
|
+ }
|
|
|
+ return Ok(JsonView(true, ffrData.Msg, ffrData.Data));
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, ex.Message));
|
|
|
+ throw;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
}
|
|
|
}
|