|
@@ -5,6 +5,8 @@ using OASystem.Domain.Entities.Financial;
|
|
|
using OASystem.Domain.Entities.Groups;
|
|
|
using OASystem.Domain.Entities.Resource;
|
|
|
using OASystem.Domain.ViewModels.Groups;
|
|
|
+using OASystem.Domain.ViewModels.QiYeWeChat;
|
|
|
+using OASystem.Domain.ViewModels.Resource;
|
|
|
using OASystem.Infrastructure.Repositories.System;
|
|
|
using System;
|
|
|
using System.Collections.Generic;
|
|
@@ -303,6 +305,67 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
return result;
|
|
|
}
|
|
|
|
|
|
+ public async Task<Result> PostGroupNameAndEasy(DecreasePaymentsDto dto)
|
|
|
+ {
|
|
|
+ Result result = new Result() { Code = -2, Msg = "未知错误" };
|
|
|
+ try
|
|
|
+ {
|
|
|
+ #region 团组下拉框
|
|
|
+
|
|
|
+
|
|
|
+ List<Grp_GroupsTaskAssignment> grp_GroupsTaskAssignment = Query<Grp_GroupsTaskAssignment>(a => a.IsDel == 0 && a.UId == dto.UserId && a.CTId == dto.CTId).ToList();
|
|
|
+
|
|
|
+ string DiId = "";
|
|
|
+ foreach (var item in grp_GroupsTaskAssignment)
|
|
|
+ {
|
|
|
+ DiId += item.DIId + ",";
|
|
|
+ }
|
|
|
+ DiId = DiId.Substring(0, DiId.Length - 1);
|
|
|
+ string sql = string.Format(@"select Id,TourCode,TeamName,ClientName,VisitStartDate,VisitEndDate,VisitCountry,VisitDays,VisitPNumber from Grp_DelegationInfo where Id in({0}) and IsDel={1}", DiId, 0);
|
|
|
+ List<DelegationEasyView> grp_Delegations = _sqlSugar.SqlQueryable<DelegationEasyView>(sql).ToList();
|
|
|
+ if (grp_Delegations.Count != 0)
|
|
|
+ {
|
|
|
+ int count = grp_Delegations.Count;
|
|
|
+ float totalPage = (float)count / dto.PageSize;//总页数
|
|
|
+ if (totalPage == 0) totalPage = 1;
|
|
|
+ else totalPage = (int)Math.Ceiling((double)totalPage);
|
|
|
+
|
|
|
+ List<DelegationEasyView> delegationEasyViews = new List<DelegationEasyView>();
|
|
|
+ for (int i = 0; i < dto.PageSize; i++)
|
|
|
+ {
|
|
|
+ var RowIndex = i + (dto.PageIndex - 1) * dto.PageSize;
|
|
|
+ if (RowIndex < grp_Delegations.Count)
|
|
|
+ {
|
|
|
+ delegationEasyViews.Add(grp_Delegations[RowIndex]);
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ break;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ ListViewBase<DelegationEasyView> rst = new ListViewBase<DelegationEasyView>();
|
|
|
+ rst.DataList = delegationEasyViews;
|
|
|
+ rst.DataCount = count;
|
|
|
+ rst.CurrPageIndex = dto.PageIndex;
|
|
|
+ rst.CurrPageSize = dto.PageSize;
|
|
|
+ return result = new Result() { Code = 0, Msg = "查询成功!", Data = rst };
|
|
|
+ }
|
|
|
+ else
|
|
|
+ {
|
|
|
+ ListViewBase<DelegationEasyView> rst = new ListViewBase<DelegationEasyView>();
|
|
|
+ return result = new Result() { Code = 0, Msg = "暂无数据!", Data = rst };
|
|
|
+ }
|
|
|
+ #endregion
|
|
|
+
|
|
|
+
|
|
|
+ }
|
|
|
+ catch (Exception ex)
|
|
|
+ {
|
|
|
+ return result = new Result() { Code = -2, Msg = "程序错误" };
|
|
|
+ throw;
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
/// <summary>
|
|
|
/// 根据团组增减款项表Id查询数据
|
|
|
/// </summary>
|