Browse Source

Merge branch 'develop' of http://132.232.92.186:3000/XinXiBu/OA2023 into develop

jiangjc 1 year ago
parent
commit
80880bee48

+ 1 - 1
OASystem/OASystem.Infrastructure/Repositories/Groups/CarTouristGuideGroundRepository.cs

@@ -346,7 +346,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                         }
                         }
                         else
                         else
                         {
                         {
-                            checkedItem = new List<string>() { "车费", "导游费", "客户午餐费用", "导游景点费", "导游小费", "接送机费", "其他费用", "司机工资", "司机小费", "司机餐补", "车超时费", "导游餐补", "导游房补", "导游交通", "客户早餐费用", "客户晚餐费用", "景点门票费", "饮料/零食/水果", "住补费用", "翻译费" };
+                            checkedItem = _TableInitialization.Select(x => x.Name).ToList();
                             checkedItemId.AddRange(_TableInitialization.Select(x => x.Id).ToList());
                             checkedItemId.AddRange(_TableInitialization.Select(x => x.Id).ToList());
                         }
                         }
                     }
                     }

+ 6 - 1
OASystem/OASystem.Infrastructure/Repositories/Groups/TourClientListRepository.cs

@@ -122,6 +122,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 //公司信息 
                 //公司信息 
                 var clientCompanySql = string.Format(@"Select Id,CompanyFullName From Crm_CustomerCompany Where IsDel = 0");
                 var clientCompanySql = string.Format(@"Select Id,CompanyFullName From Crm_CustomerCompany Where IsDel = 0");
                 var clientCompanyData = await _sqlSugar.SqlQueryable<CustomerCompanyCiew>(clientCompanySql).ToListAsync();
                 var clientCompanyData = await _sqlSugar.SqlQueryable<CustomerCompanyCiew>(clientCompanySql).ToListAsync();
+                clientCompanyData = clientCompanyData.DistinctBy(it => it.CompanyFullName).ToList();
 
 
                 var _view = new {
                 var _view = new {
                     ShippingSpaceTypeData = _ShippingSpaceTypeData,
                     ShippingSpaceTypeData = _ShippingSpaceTypeData,
@@ -268,7 +269,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                 else
                 else
                 {
                 {
                     var companyInfo = await _sqlSugar.Queryable<Crm_CustomerCompany>().Where(it => it.IsDel == 0 &&
                     var companyInfo = await _sqlSugar.Queryable<Crm_CustomerCompany>().Where(it => it.IsDel == 0 &&
-                                                                                                   it.Id == clientInfo.CrmCompanyId
+                                                                                                   it.CompanyFullName.Equals(dto.CompanyFullName)
                                                                                              ).FirstAsync();
                                                                                              ).FirstAsync();
                     if (companyInfo != null)
                     if (companyInfo != null)
                     {
                     {
@@ -294,6 +295,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                     }
                     }
                     else
                     else
                     {
                     {
+
                         var companyAdd = await _sqlSugar.Insertable(_CustomerCompany).ExecuteReturnIdentityAsync();
                         var companyAdd = await _sqlSugar.Insertable(_CustomerCompany).ExecuteReturnIdentityAsync();
                         if (companyAdd < 0)
                         if (companyAdd < 0)
                         {
                         {
@@ -302,6 +304,8 @@ namespace OASystem.Infrastructure.Repositories.Groups
                             return _result;
                             return _result;
                         }
                         }
                         crmCompanyId = companyAdd;
                         crmCompanyId = companyAdd;
+                        
+                        
                     }
                     }
                 }
                 }
 
 
@@ -315,6 +319,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
                     var clientEdit = await _sqlSugar.Updateable(_DeleClient).UpdateColumns(it =>
                     var clientEdit = await _sqlSugar.Updateable(_DeleClient).UpdateColumns(it =>
                                                                                  new
                                                                                  new
                                                                                  {
                                                                                  {
+                                                                                     it.CrmCompanyId,
                                                                                      it.LastName,
                                                                                      it.LastName,
                                                                                      it.FirstName,
                                                                                      it.FirstName,
                                                                                      it.Pinyin,
                                                                                      it.Pinyin,