|
@@ -1,6 +1,7 @@
|
|
using Aspose.Cells;
|
|
using Aspose.Cells;
|
|
using Aspose.Words;
|
|
using Aspose.Words;
|
|
using EyeSoft.Extensions;
|
|
using EyeSoft.Extensions;
|
|
|
|
+using NPOI.SS.Formula.PTG;
|
|
using OASystem.API.OAMethodLib;
|
|
using OASystem.API.OAMethodLib;
|
|
using OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice;
|
|
using OASystem.API.OAMethodLib.QiYeWeChatAPI.AppNotice;
|
|
using OASystem.Domain.AesEncryption;
|
|
using OASystem.Domain.AesEncryption;
|
|
@@ -9,6 +10,7 @@ using OASystem.Domain.Entities.Groups;
|
|
using OASystem.Domain.ViewModels.Groups;
|
|
using OASystem.Domain.ViewModels.Groups;
|
|
using OASystem.Infrastructure.Repositories.Groups;
|
|
using OASystem.Infrastructure.Repositories.Groups;
|
|
using System.Collections.Generic;
|
|
using System.Collections.Generic;
|
|
|
|
+using System.ComponentModel.DataAnnotations;
|
|
using System.Data;
|
|
using System.Data;
|
|
using System.Diagnostics;
|
|
using System.Diagnostics;
|
|
using System.Linq;
|
|
using System.Linq;
|
|
@@ -45,6 +47,7 @@ namespace OASystem.API.Controllers
|
|
private readonly MediaSuppliersRepository _mediaSupplierRep;
|
|
private readonly MediaSuppliersRepository _mediaSupplierRep;
|
|
private readonly List<int> _portIds;
|
|
private readonly List<int> _portIds;
|
|
private readonly BasicInsuranceCostRepository _insuranceCostRep;
|
|
private readonly BasicInsuranceCostRepository _insuranceCostRep;
|
|
|
|
+ private readonly GamesBudgetMasterRepository _gamesBudgetMasterRep;
|
|
|
|
|
|
public ResourceController(
|
|
public ResourceController(
|
|
IMapper mapper,
|
|
IMapper mapper,
|
|
@@ -67,7 +70,8 @@ namespace OASystem.API.Controllers
|
|
DelegationInfoRepository delegationInfoRep,
|
|
DelegationInfoRepository delegationInfoRep,
|
|
TranslatorLibraryRepository translatorRep,
|
|
TranslatorLibraryRepository translatorRep,
|
|
MediaSuppliersRepository mediaSupplierRep,
|
|
MediaSuppliersRepository mediaSupplierRep,
|
|
- BasicInsuranceCostRepository insuranceCostRep
|
|
|
|
|
|
+ BasicInsuranceCostRepository insuranceCostRep,
|
|
|
|
+ GamesBudgetMasterRepository gamesBudgetMasterRep
|
|
)
|
|
)
|
|
{
|
|
{
|
|
_mapper = mapper;
|
|
_mapper = mapper;
|
|
@@ -92,6 +96,7 @@ namespace OASystem.API.Controllers
|
|
_mediaSupplierRep = mediaSupplierRep;
|
|
_mediaSupplierRep = mediaSupplierRep;
|
|
_portIds = new List<int> { 1, 2, 3 };
|
|
_portIds = new List<int> { 1, 2, 3 };
|
|
_insuranceCostRep = insuranceCostRep;
|
|
_insuranceCostRep = insuranceCostRep;
|
|
|
|
+ _gamesBudgetMasterRep = gamesBudgetMasterRep;
|
|
}
|
|
}
|
|
|
|
|
|
#region 车公司资料板块
|
|
#region 车公司资料板块
|
|
@@ -4801,6 +4806,76 @@ WHERE
|
|
return Ok(JsonView(true));
|
|
return Ok(JsonView(true));
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ #endregion
|
|
|
|
+
|
|
|
|
+ #region 世运会成本预算明细
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 世运会成本预算明细
|
|
|
|
+ /// Info
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="id"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpGet("{id}")]
|
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
|
+ public async Task<IActionResult> GamesBudgetMasterInfo([Required(ErrorMessage = "数据编号不能为空!")]int id)
|
|
|
|
+ {
|
|
|
|
+ return Ok( await _gamesBudgetMasterRep.InfoAsync(id));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 世运会成本预算明细
|
|
|
|
+ /// List
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dto"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPost]
|
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
|
+ public async Task<IActionResult> GamesBudgetMasterList(GamesBudgetMasterListDto dto)
|
|
|
|
+ {
|
|
|
|
+ return Ok(await _gamesBudgetMasterRep.ListAsync(dto));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 世运会成本预算明细
|
|
|
|
+ /// OP(Add/Edit)
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dto"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPost]
|
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
|
+ public async Task<IActionResult> GamesBudgetMasterOP(GamesBudgetMasterOPDto dto)
|
|
|
|
+ {
|
|
|
|
+ if (dto.Id > 0)
|
|
|
|
+ {
|
|
|
|
+ //修改
|
|
|
|
+ var editDto = _mapper.Map<GamesBudgetMasterEditDto>(dto);
|
|
|
|
+ return Ok(await _gamesBudgetMasterRep.EditAsync(editDto));
|
|
|
|
+ }
|
|
|
|
+ else if (dto.Id < 1)
|
|
|
|
+ {
|
|
|
|
+ //添加
|
|
|
|
+ var addDto = _mapper.Map<GamesBudgetMasterAddDto>(dto);
|
|
|
|
+ return Ok(await _gamesBudgetMasterRep.AddAsync(addDto));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ return Ok(JsonView(false));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ /// <summary>
|
|
|
|
+ /// 世运会成本预算明细
|
|
|
|
+ /// OP(Add/Edit)
|
|
|
|
+ /// </summary>
|
|
|
|
+ /// <param name="dto"></param>
|
|
|
|
+ /// <returns></returns>
|
|
|
|
+ [HttpPost]
|
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
|
+ public async Task<IActionResult> GamesBudgetMasterDel(GamesBudgetMasterDelDto dto)
|
|
|
|
+ {
|
|
|
|
+ return Ok(await _gamesBudgetMasterRep.DelAsync(dto));
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+
|
|
#endregion
|
|
#endregion
|
|
}
|
|
}
|
|
}
|
|
}
|