|
@@ -27,11 +27,12 @@ namespace OASystem.API.Controllers
|
|
private readonly DailyFeePaymentRepository _daiRep; //日付申请仓库
|
|
private readonly DailyFeePaymentRepository _daiRep; //日付申请仓库
|
|
private readonly TeamRateRepository _teamRateRep; //团组汇率仓库
|
|
private readonly TeamRateRepository _teamRateRep; //团组汇率仓库
|
|
private readonly ForeignReceivablesRepository _ForForeignReceivablesRep; //对外收款账单仓库
|
|
private readonly ForeignReceivablesRepository _ForForeignReceivablesRep; //对外收款账单仓库
|
|
|
|
+ private readonly ProceedsReceivedRepository _proceedsReceivedRep; //已收款项仓库
|
|
|
|
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 初始化
|
|
/// 初始化
|
|
/// </summary>
|
|
/// </summary>
|
|
- public FinancialController(IMapper mapper, IConfiguration configuration, DailyFeePaymentRepository daiRep, SqlSugarClient sqlSugar, SetDataTypeRepository setDataTypeRep, TeamRateRepository teamRateRep, ForeignReceivablesRepository ForForeignReceivablesRep)
|
|
|
|
|
|
+ public FinancialController(IMapper mapper, IConfiguration configuration, DailyFeePaymentRepository daiRep, SqlSugarClient sqlSugar, SetDataTypeRepository setDataTypeRep, TeamRateRepository teamRateRep, ForeignReceivablesRepository ForForeignReceivablesRep, ProceedsReceivedRepository proceedsReceivedRep)
|
|
{
|
|
{
|
|
_mapper = mapper;
|
|
_mapper = mapper;
|
|
_config = configuration;
|
|
_config = configuration;
|
|
@@ -40,6 +41,7 @@ namespace OASystem.API.Controllers
|
|
_setDataTypeRep = setDataTypeRep;
|
|
_setDataTypeRep = setDataTypeRep;
|
|
_teamRateRep = teamRateRep;
|
|
_teamRateRep = teamRateRep;
|
|
_ForForeignReceivablesRep = ForForeignReceivablesRep;
|
|
_ForForeignReceivablesRep = ForForeignReceivablesRep;
|
|
|
|
+ _proceedsReceivedRep = proceedsReceivedRep;
|
|
}
|
|
}
|
|
|
|
|
|
#region 日付申请
|
|
#region 日付申请
|
|
@@ -64,6 +66,27 @@ namespace OASystem.API.Controllers
|
|
return Ok(JsonView(data));
|
|
return Ok(JsonView(data));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 获取日付申请 基础数据源 - 转账表识
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dto"> 日付申请 分页 dto</param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPost]
|
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
|
+ public async Task<IActionResult> GetSearchDailyPaymentPriceTypeAddData(PortDtoBase dto)
|
|
|
|
+ {
|
|
|
|
+ var result = await _daiRep.GetPriceTypeAddData(dto);
|
|
|
|
+
|
|
|
|
+ if (result == null || result.Code != 0)
|
|
|
|
+ {
|
|
|
|
+ return Ok(JsonView(false, result.Msg));
|
|
|
|
+ }
|
|
|
|
+ var data = result.Data;
|
|
|
|
+
|
|
|
|
+ return Ok(JsonView(data));
|
|
|
|
+ }
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 日付申请 Page Search
|
|
/// 日付申请 Page Search
|
|
/// </summary>
|
|
/// </summary>
|
|
@@ -427,19 +450,20 @@ namespace OASystem.API.Controllers
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+
|
|
/// <summary>
|
|
/// <summary>
|
|
/// 对外收款账单
|
|
/// 对外收款账单
|
|
- /// 添加 Or 更新
|
|
|
|
|
|
+ /// 账单 删除
|
|
/// </summary>
|
|
/// </summary>
|
|
/// <param name="dto"></param>
|
|
/// <param name="dto"></param>
|
|
/// <returns></returns>
|
|
/// <returns></returns>
|
|
[HttpPost]
|
|
[HttpPost]
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
- public async Task<IActionResult> PostGroupReceivablesUpdate(ForForeignReceivablesInfoDto dto)
|
|
|
|
|
|
+ public async Task<IActionResult> PostGroupReceivablesDel(DelForForeignReceivablesInfoDto dto)
|
|
{
|
|
{
|
|
try
|
|
try
|
|
{
|
|
{
|
|
- Result ffrData = await _ForForeignReceivablesRep.GetGroupReceivablesInfoByDiId(dto);
|
|
|
|
|
|
+ Result ffrData = await _ForForeignReceivablesRep._Del(dto);
|
|
if (ffrData.Code != 0)
|
|
if (ffrData.Code != 0)
|
|
{
|
|
{
|
|
return Ok(JsonView(false, ffrData.Msg));
|
|
return Ok(JsonView(false, ffrData.Msg));
|
|
@@ -453,6 +477,86 @@ namespace OASystem.API.Controllers
|
|
}
|
|
}
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 对外收款账单
|
|
|
|
+ /// 添加 And 更新
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dto"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPost]
|
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
|
+ public async Task<IActionResult> PostReceivablesOperate(ForeignReceivablesAddAndUpdateDto dto)
|
|
|
|
+ {
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ Result ffrData = await _ForForeignReceivablesRep.PostReceivablesOperate(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;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 已收款项
|
|
|
|
+ /// 账单 删除
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dto"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPost]
|
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
|
+ public async Task<IActionResult> PostAmountReceivedDel(ProceedsReceivedDelDto dto)
|
|
|
|
+ {
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ Result ffrData = await _proceedsReceivedRep._Del(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;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 已收款项
|
|
|
|
+ /// 添加 And 更新
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dto"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPost]
|
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
|
+ public async Task<IActionResult> PostAmountReceivedOperate(ProceedsReceivedDto dto)
|
|
|
|
+ {
|
|
|
|
+ try
|
|
|
|
+ {
|
|
|
|
+ Result ffrData = await _proceedsReceivedRep.PostAmountReceivedOperate(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
|
|
#endregion
|
|
}
|
|
}
|
|
}
|
|
}
|