|  | @@ -326,6 +326,59 @@ namespace OASystem.Infrastructure.Repositories.Financial
 | 
	
		
			
				|  |  |              return result;
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  | +        /// <summary>
 | 
	
		
			
				|  |  | +        /// 收款账单数据源团组分页
 | 
	
		
			
				|  |  | +        /// </summary>
 | 
	
		
			
				|  |  | +        /// <returns></returns>
 | 
	
		
			
				|  |  | +        public async Task<JsonView> PostDataSourceOffSet(ForeignReceivablesDataSourcesOffSetDto dto)
 | 
	
		
			
				|  |  | +        {
 | 
	
		
			
				|  |  | +            JsonView result = new() { Code = StatusCodes.Status204NoContent };
 | 
	
		
			
				|  |  | +            if (dto.PageIndex < 1) dto.PageIndex = 1;
 | 
	
		
			
				|  |  | +            if (dto.PageSize < 1) dto.PageSize = 10;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            //已收款项 判断如果是市场部的人员进来的话 只显示自己的 其他的都显示全部的
 | 
	
		
			
				|  |  | +            var userInfos = await _sqlSugar.Queryable<Sys_Users>()
 | 
	
		
			
				|  |  | +                                           .InnerJoin<Sys_Department>((u, d) => u.DepId == d.Id)
 | 
	
		
			
				|  |  | +                                           .Where((u, d) => u.IsDel == 0 && d.DepName.Contains("市场部") && u.Id == dto.CurrUserId)
 | 
	
		
			
				|  |  | +                                           .ToListAsync();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            var expressionWhere = Expressionable.Create<Grp_DelegationInfo>()
 | 
	
		
			
				|  |  | +                                                .And(x => x.IsDel == 0 && x.TeamName != "")
 | 
	
		
			
				|  |  | +                                                .AndIF(userInfos.Count > 0, x => x.JietuanOperator == dto.CurrUserId)
 | 
	
		
			
				|  |  | +                                                .ToExpression();
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            var totalNumber = 0;
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            var _groupNameList =  _sqlSugar.Queryable<Grp_DelegationInfo>()
 | 
	
		
			
				|  |  | +                                            .Where(expressionWhere)
 | 
	
		
			
				|  |  | +                                            .ToPageList(dto.PageIndex, dto.PageSize, ref  totalNumber)
 | 
	
		
			
				|  |  | +                                            .Select(x=> new GroupNameView
 | 
	
		
			
				|  |  | +                                            {
 | 
	
		
			
				|  |  | +                                                 GroupName = x.TeamName,
 | 
	
		
			
				|  |  | +                                                 Id = x.Id,
 | 
	
		
			
				|  |  | +                                            });
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            if (totalNumber > 0)
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                totalNumber = totalNumber / dto.PageSize + 1;
 | 
	
		
			
				|  |  | +            }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            var currencyData = await _setDataRep.GetSetDataBySTId(_setDataRep, 66); //币种
 | 
	
		
			
				|  |  | +            var remittanceMethodData = await _setDataRep.GetSetDataBySTId(_setDataRep, 14); //汇款方式
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            result.Code = StatusCodes.Status200OK;
 | 
	
		
			
				|  |  | +            result.Msg = "成功!";
 | 
	
		
			
				|  |  | +            result.Data = new
 | 
	
		
			
				|  |  | +            {
 | 
	
		
			
				|  |  | +                GroupNameData = _groupNameList,
 | 
	
		
			
				|  |  | +                CurrencyData = currencyData.Data,
 | 
	
		
			
				|  |  | +                RemittanceMethodData = remittanceMethodData.Data,
 | 
	
		
			
				|  |  | +                GroupTotalPage = totalNumber
 | 
	
		
			
				|  |  | +            };
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  | +            return result;
 | 
	
		
			
				|  |  | +        }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |          /// <summary>
 | 
	
		
			
				|  |  |          /// 根据diid查询团组应收款项
 | 
	
		
			
				|  |  |          /// </summary>
 |