Bladeren bron

1.机票费用录入 导出报表 更改 客户数据源

leiy 11 maanden geleden
bovenliggende
commit
7079550af2

+ 4 - 2
OASystem/OASystem.Infrastructure/Repositories/Groups/TourClientListRepository.cs

@@ -1019,6 +1019,8 @@ namespace OASystem.Infrastructure.Repositories.Groups
             if (string.IsNullOrEmpty(ids)) return clientStr;
             List<int> intList = new List<int>();
 
+
+
             //if (ids.Contains(","))
             //{
             //    string[] numbers = ids.Split(',');
@@ -1038,9 +1040,9 @@ namespace OASystem.Infrastructure.Repositories.Groups
             //    }
             //}
 
-            string sql = string.Format(@$"Select * From Crm_GroupCustomer Where IsDel = 0 And Id  In ({ids})");
+            string sql = string.Format(@$"Select * From Crm_DeleClient Where IsDel = 0 And Id  In ({ids})");
 
-            var infos = _sqlSugar.SqlQueryable<Crm_GroupCustomer>(sql).ToList();
+            var infos = _sqlSugar.SqlQueryable<Crm_DeleClient>(sql).ToList();
 
             if (infos.Count > 0)
             {

+ 28 - 3
OASystem/OASystem.Infrastructure/Repositories/Groups/VisaFeeInfoRepository.cs

@@ -22,13 +22,15 @@ namespace OASystem.Infrastructure.Repositories.Groups
         private readonly IMapper _mapper;
         private Result _result;
         private readonly CountryFeeRepository _countryFeeRep;
+        private readonly DelegationInfoRepository _groupRep;
 
-        public VisaFeeInfoRepository(SqlSugarClient sqlSugar, IMapper mapper, CountryFeeRepository countryFeeRep)
+        public VisaFeeInfoRepository(SqlSugarClient sqlSugar, IMapper mapper, CountryFeeRepository countryFeeRep, DelegationInfoRepository groupRep)
             : base(sqlSugar)
         {
             _mapper = mapper;
             _result = new Result() { Code = -2,Msg = "操作失败!"};
             _countryFeeRep = countryFeeRep;
+            _groupRep = groupRep;
         }
 
 
@@ -66,19 +68,42 @@ namespace OASystem.Infrastructure.Repositories.Groups
                                           Where vfi.Isdel = 0  And vfi.Diid = {diId}");
             var data = await _sqlSugar.SqlQueryable<VisaFeeInfosView>(sql).ToListAsync();
 
-            //默认十行
+            //默认十行 雷怡 2024-26-08 11:26:40 
             if (data.Count <= 10)
             {
                 int defaultRow = 10 - data.Count;
                 for (int i = 0; i < defaultRow; i++)
                 {
-
                     data.Add(new VisaFeeInfosView() {
                         Id = 0,
                         OBType =1
                     });
                 }
             }
+            else if (data.Count == 0)
+            {
+                var groupInfo = await _groupRep.PostShareGroupInfo(new ShareGroupInfoDto() { PortType = 1, Id = diId });
+                List<string> countrys = new List<string>();
+                if (groupInfo.Code == 0) {
+                    countrys = _groupRep.GroupSplitCountry((groupInfo.Data as Web_ShareGroupInfoView)?.VisitCountry ?? "");
+                }
+
+                if (countrys.Count > 0)
+                {
+
+                }
+                else
+                {
+                    for (int i = 0; i < 10; i++)
+                    {
+                        data.Add(new VisaFeeInfosView()
+                        {
+                            Id = 0,
+                            OBType = 1
+                        });
+                    }
+                }
+            }
 
             _result.Code = 0;
             _result.Data = data;