|
@@ -65,6 +65,8 @@ namespace OASystem.API.Controllers
|
|
|
private readonly CostTypeHotelNumberRepository _CostTypeHotelNumberRepository;
|
|
|
private readonly GroupCostParameterRepository _GroupCostParameterRepository;
|
|
|
#endregion
|
|
|
+
|
|
|
+ private readonly SetDataRepository _setDataRep;
|
|
|
private string url;
|
|
|
private string path;
|
|
|
|
|
@@ -73,8 +75,9 @@ namespace OASystem.API.Controllers
|
|
|
public GroupsController(IMapper mapper, SqlSugarClient sqlSugar, GrpScheduleRepository grpScheduleRep, DelegationInfoRepository groupRepository,
|
|
|
TaskAssignmentRepository taskAssignmentRep, AirTicketResRepository airTicketResRep, DecreasePaymentsRepository decreasePaymentsRep,
|
|
|
InvitationOfficialActivitiesRepository InvitationOfficialActivitiesRep, DelegationEnDataRepository delegationEnDataRep, EnterExitCostRepository enterExitCostRep
|
|
|
- , DelegationVisaRepository delegationVisaRep, MessageRepository message, VisaPriceRepository visaPriceRep, CarTouristGuideGroundRepository carTouristGuideGroundRep, CheckBoxsRepository checkBoxs, GroupCostRepository GroupCostRepository, CostTypeHotelNumberRepository CostTypeHotelNumberRepository,
|
|
|
- GroupCostParameterRepository GroupCostParameterRepository, HotelPriceRepository hotelPriceRep, CustomersRepository customersRep)
|
|
|
+ , DelegationVisaRepository delegationVisaRep, MessageRepository message, VisaPriceRepository visaPriceRep, CarTouristGuideGroundRepository carTouristGuideGroundRep,
|
|
|
+ CheckBoxsRepository checkBoxs, GroupCostRepository GroupCostRepository, CostTypeHotelNumberRepository CostTypeHotelNumberRepository,
|
|
|
+ GroupCostParameterRepository GroupCostParameterRepository, HotelPriceRepository hotelPriceRep, CustomersRepository customersRep, SetDataRepository setDataRep)
|
|
|
{
|
|
|
_mapper = mapper;
|
|
|
_grpScheduleRep = grpScheduleRep;
|
|
@@ -101,10 +104,10 @@ namespace OASystem.API.Controllers
|
|
|
_CostTypeHotelNumberRepository = CostTypeHotelNumberRepository;
|
|
|
_GroupCostParameterRepository = GroupCostParameterRepository;
|
|
|
_hotelPriceRep = hotelPriceRep;
|
|
|
- _customersRep=customersRep;
|
|
|
+ _customersRep = customersRep;
|
|
|
+ _setDataRep = setDataRep;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
#region 流程管控
|
|
|
|
|
|
|
|
@@ -265,7 +268,18 @@ namespace OASystem.API.Controllers
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> PostGroupPageList(GroupPageListDto dto)
|
|
|
{
|
|
|
- if (dto == null) return Ok(JsonView(false, "请输入搜索搜索条件!"));
|
|
|
+ #region 参数验证
|
|
|
+ if (dto.UserId < 1) return Ok(JsonView(false, "员工Id为空"));
|
|
|
+ if (dto.PageId < 1) return Ok(JsonView(false, "页面Id为空"));
|
|
|
+
|
|
|
+ PageFunAuthViewBase pageFunAuthView = new PageFunAuthViewBase();
|
|
|
+ #region 页面操作权限验证
|
|
|
+ pageFunAuthView = await GeneralMethod.PostUserPageFuncDatas(dto.UserId, dto.PageId);
|
|
|
+
|
|
|
+ if (pageFunAuthView.CheckAuth == 0) return Ok(JsonView(false, "您没有查看权限"));
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #endregion
|
|
|
|
|
|
if (dto.PortType == 1 || dto.PortType == 2)
|
|
|
{
|
|
@@ -286,7 +300,7 @@ namespace OASystem.API.Controllers
|
|
|
tj, tj, tj, tj, tj);
|
|
|
}
|
|
|
|
|
|
- string sql = string.Format(@"Select Row_Number,SalesQuoteNo,TourCode,TeamTypeId, TeamType,
|
|
|
+ string sql = string.Format(@"Select Row_Number,Id,SalesQuoteNo,TourCode,TeamTypeId, TeamType,
|
|
|
TeamLevId,TeamLev,TeamName,ClientName,ClientUnit,
|
|
|
VisitDate,VisitDays,VisitPNumber,JietuanOperator,IsSure,CreateTime
|
|
|
From (
|
|
@@ -304,7 +318,13 @@ namespace OASystem.API.Controllers
|
|
|
RefAsync<int> total = 0;
|
|
|
var _DelegationList = await _sqlSugar.SqlQueryable<DelegationListView>(sql).ToPageListAsync(dto.PageIndex, dto.PageSize, total);
|
|
|
|
|
|
- return Ok(JsonView(true, "查询成功!", _DelegationList, total));
|
|
|
+ var _view = new
|
|
|
+ {
|
|
|
+ PageFuncAuth = pageFunAuthView,
|
|
|
+ Data = _DelegationList
|
|
|
+ };
|
|
|
+ return Ok(JsonView(true, "查询成功!", _view, total));
|
|
|
+
|
|
|
|
|
|
}
|
|
|
else
|
|
@@ -810,6 +830,79 @@ namespace OASystem.API.Controllers
|
|
|
|
|
|
#region 团组费用审核
|
|
|
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ [HttpPost]
|
|
|
+ [ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
+ public async Task<IActionResult> PostExpenseAuditGroupPageItems(ExpenseAuditGroupPageItemsDto _dto)
|
|
|
+ {
|
|
|
+ #region 参数验证
|
|
|
+ if (_dto.UserId < 1) return Ok(JsonView(false, "员工Id为空"));
|
|
|
+ if (_dto.PageId < 1) return Ok(JsonView(false, "页面Id为空"));
|
|
|
+
|
|
|
+ PageFunAuthViewBase pageFunAuthView = new PageFunAuthViewBase();
|
|
|
+ #region 页面操作权限验证
|
|
|
+ pageFunAuthView = await GeneralMethod.PostUserPageFuncDatas(_dto.UserId, _dto.PageId);
|
|
|
+
|
|
|
+ if (pageFunAuthView.CheckAuth == 0) return Ok(JsonView(false, "您没有查看权限"));
|
|
|
+ #endregion
|
|
|
+
|
|
|
+ #endregion
|
|
|
+ if (_dto.PortType == 1 || _dto.PortType == 2 || _dto.PortType == 2)
|
|
|
+ {
|
|
|
+ string sqlWhere = string.Empty;
|
|
|
+ if (_dto.IsSure == 0)
|
|
|
+ {
|
|
|
+ sqlWhere += string.Format(@" And IsSure = 0");
|
|
|
+ }
|
|
|
+ else if (_dto.IsSure == 1)
|
|
|
+ {
|
|
|
+ sqlWhere += string.Format(@" And IsSure = 1");
|
|
|
+ }
|
|
|
+
|
|
|
+ if (!string.IsNullOrEmpty(_dto.SearchCriteria))
|
|
|
+ {
|
|
|
+ string tj = _dto.SearchCriteria;
|
|
|
+ sqlWhere += string.Format(@"And (ssd.Name Like '%{0}%' Or TeamName Like '%{1}%' Or ClientName Like '%{2}%' Or ClientName Like '%{3}%' Or su.CnName Like '%{4}%')",
|
|
|
+ tj, tj, tj, tj, tj);
|
|
|
+ }
|
|
|
+
|
|
|
+ string sql = string.Format(@"Select Row_Number,Id,SalesQuoteNo,TourCode,TeamTypeId, TeamType,
|
|
|
+ TeamName,ClientName,ClientUnit, TeamLevId,TeamLev,VisitDate,
|
|
|
+ VisitDays,VisitPNumber,JietuanOperator,IsSure,CreateTime
|
|
|
+ From (
|
|
|
+ Select row_number() over(order by gdi.VisitDate Desc) as Row_Number,
|
|
|
+ gdi.Id,SalesQuoteNo,TourCode,ssd1.Id TeamLevId,ssd1.Name TeamLev,TeamName,
|
|
|
+ ClientName,ClientUnit,ssd.Id TeamTypeId, ssd.Name TeamType,VisitDate,
|
|
|
+ VisitDays,VisitPNumber,su.CnName JietuanOperator,IsSure,gdi.CreateTime
|
|
|
+ From Grp_DelegationInfo gdi
|
|
|
+ Inner Join Sys_SetData ssd On gdi.TeamDid = ssd.Id
|
|
|
+ Inner Join Sys_SetData ssd1 On gdi.TeamLevSId = ssd1.Id
|
|
|
+ Left Join Sys_Users su On gdi.JietuanOperator = su.Id
|
|
|
+ Where gdi.IsDel = 0 {0}
|
|
|
+ ) temp ", sqlWhere);
|
|
|
+
|
|
|
+ RefAsync<int> total = 0;
|
|
|
+ var _DelegationList = await _sqlSugar.SqlQueryable<DelegationListView>(sql).ToPageListAsync(_dto.PageIndex, _dto.PageSize, total);
|
|
|
+
|
|
|
+ var _view = new
|
|
|
+ {
|
|
|
+ PageFuncAuth = pageFunAuthView,
|
|
|
+ Data = _DelegationList
|
|
|
+ };
|
|
|
+ return Ok(JsonView(true, "查询成功!", _view, total));
|
|
|
+
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ return Ok(JsonView(false, "查询失败"));
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
|
|
|
|
|
@@ -819,10 +912,21 @@ namespace OASystem.API.Controllers
|
|
|
[ProducesResponseType(typeof(JsonView), StatusCodes.Status200OK)]
|
|
|
public async Task<IActionResult> PostSearchGrpCreditCardPayment(Search_GrpCreditCardPaymentDto _dto)
|
|
|
{
|
|
|
- if (_dto.DiId < 1)
|
|
|
- {
|
|
|
- return Ok(JsonView(false, "团组Id为空"));
|
|
|
- }
|
|
|
+ #region 参数验证
|
|
|
+ if (_dto.UserId < 1) return Ok(JsonView(false, "员工Id为空"));
|
|
|
+ if (_dto.PageId < 1) return Ok(JsonView(false, "页面Id为空"));
|
|
|
+ if (_dto.DiId < 1) return Ok(JsonView(false, "团组Id为空"));
|
|
|
+
|
|
|
+ PageFunAuthViewBase pageFunAuthView = new PageFunAuthViewBase();
|
|
|
+ #region 页面操作权限验证
|
|
|
+ pageFunAuthView = await GeneralMethod.PostUserPageFuncDatas(_dto.UserId,_dto.PageId);
|
|
|
+
|
|
|
+ if (pageFunAuthView.CheckAuth == 0) return Ok(JsonView(false, "您没有查看权限"));
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ #endregion
|
|
|
+
|
|
|
Grp_CreditCardPaymentView _view = new Grp_CreditCardPaymentView();
|
|
|
|
|
|
#region 团组基本信息
|
|
@@ -1036,6 +1140,7 @@ namespace OASystem.API.Controllers
|
|
|
}
|
|
|
|
|
|
#endregion
|
|
|
+
|
|
|
_view.DetailList = new List<Grp_CreditCardPaymentDetailView>(detailList);
|
|
|
_view.TotalStr1 = string.Format(@"应付款总金额:{0}CNY | {1}USD | {2}EUR", CNY, USD, EUR);
|
|
|
_view.TotalStr2 = string.Format(@"此次付款总金额:{0}CNY | {1}USD | {2}EUR", PayCNY, PayUSD, PayEUR);
|