@@ -346,7 +346,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
}
else
{
- checkedItem = new List<string>() { "车费", "导游费", "客户午餐费用", "导游景点费", "导游小费", "接送机费", "其他费用", "司机工资", "司机小费", "司机餐补", "车超时费", "导游餐补", "导游房补", "导游交通", "客户早餐费用", "客户晚餐费用", "景点门票费", "饮料/零食/水果", "住补费用", "翻译费" };
+ checkedItem = _TableInitialization.Select(x => x.Name).ToList();
checkedItemId.AddRange(_TableInitialization.Select(x => x.Id).ToList());
@@ -122,6 +122,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
//公司信息
var clientCompanySql = string.Format(@"Select Id,CompanyFullName From Crm_CustomerCompany Where IsDel = 0");
var clientCompanyData = await _sqlSugar.SqlQueryable<CustomerCompanyCiew>(clientCompanySql).ToListAsync();
+ clientCompanyData = clientCompanyData.DistinctBy(it => it.CompanyFullName).ToList();
var _view = new {
ShippingSpaceTypeData = _ShippingSpaceTypeData,
@@ -268,7 +269,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
var companyInfo = await _sqlSugar.Queryable<Crm_CustomerCompany>().Where(it => it.IsDel == 0 &&
- it.Id == clientInfo.CrmCompanyId
+ it.CompanyFullName.Equals(dto.CompanyFullName)
).FirstAsync();
if (companyInfo != null)
@@ -294,6 +295,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
+
var companyAdd = await _sqlSugar.Insertable(_CustomerCompany).ExecuteReturnIdentityAsync();
if (companyAdd < 0)
@@ -302,6 +304,8 @@ namespace OASystem.Infrastructure.Repositories.Groups
return _result;
crmCompanyId = companyAdd;
@@ -315,6 +319,7 @@ namespace OASystem.Infrastructure.Repositories.Groups
var clientEdit = await _sqlSugar.Updateable(_DeleClient).UpdateColumns(it =>
new
+ it.CrmCompanyId,
it.LastName,
it.FirstName,
it.Pinyin,