|
@@ -272,7 +272,6 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
result.Msg = "成功!";
|
|
|
result.Data = _DelegationInfo;
|
|
|
|
|
|
-
|
|
|
if (dto.PortType == 2)
|
|
|
{
|
|
|
var GroupProcessOperationDtoParam = new GroupProcessOperationDto();
|
|
@@ -320,6 +319,53 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
|
result.Data = GroupProcessOperationDtoParam;
|
|
|
}
|
|
|
|
|
|
+ if (dto.PortType == 3)
|
|
|
+ {
|
|
|
+ var GroupProcessOperationDtoParam = new GroupProcessOperationDto();
|
|
|
+ GroupProcessOperationDtoParam = _mapper.Map<DelegationInfoWebView, GroupProcessOperationDto>(_DelegationInfo);
|
|
|
+ List<Crm_DeleClient> DeleClientArr = await _sqlSugar.Queryable<Crm_DeleClient>().Where(it => it.IsDel == 0).ToListAsync(); //客户信息
|
|
|
+ List<Grp_TourClientList> _DeleClients = await _sqlSugar.Queryable<Grp_TourClientList>().Where(it => it.IsDel == 0 && it.DiId == dto.Id).ToListAsync(); // 接团客户名单
|
|
|
+ List<Crm_CustomerCert> _CustomerCerts = await _sqlSugar.Queryable<Crm_CustomerCert>().Where(it => it.IsDel == 0 && it.SdId == 773).ToListAsync(); // 身份证类型证件信息
|
|
|
+ List<Crm_CustomerCompany> CompanyArr = await _sqlSugar.Queryable<Crm_CustomerCompany>().Where(it => it.IsDel == 0).ToListAsync();
|
|
|
+ var TourClientListInfoArr = new List<TourClientListProcessInfo>();
|
|
|
+ var timeParam = new DateTime();
|
|
|
+ foreach (var item in _DeleClients)
|
|
|
+ {
|
|
|
+ var param = new TourClientListProcessInfo();
|
|
|
+ var clientInfo = DeleClientArr.FirstOrDefault(x => x.Id == item.ClientId);
|
|
|
+ if (clientInfo == null) clientInfo = new Crm_DeleClient();
|
|
|
+ var clientIDInfo = _CustomerCerts.FirstOrDefault(x => x.DcId == item.ClientId); //身份证信息
|
|
|
+ if (clientIDInfo == null) clientIDInfo = new Crm_CustomerCert();
|
|
|
+ var Company = CompanyArr.FirstOrDefault(x => x.Id == clientInfo.CrmCompanyId);
|
|
|
+ if (Company == null) Company = new Crm_CustomerCompany();
|
|
|
+
|
|
|
+ param.IDCardNo = clientIDInfo.CertNo;
|
|
|
+ param.Remark = item.Remark;
|
|
|
+ param.BirthDay = DateTime.TryParse(clientInfo.BirthDay, out timeParam) ? timeParam.ToString("yyyy-MM-dd") : "";
|
|
|
+ param.FirstName = clientInfo.FirstName;
|
|
|
+ param.LastName = clientInfo.LastName;
|
|
|
+ param.CompanyFullName = Company.CompanyFullName;
|
|
|
+ param.Job = clientInfo.Job;
|
|
|
+ param.Sex = clientInfo.Sex;
|
|
|
+ param.Phone = clientInfo.Phone;
|
|
|
+ param.Pinyin = clientInfo.Pinyin;
|
|
|
+ param.HotelSpecialNeeds = item.HotelSpecialNeeds;
|
|
|
+ param.MealSpecialNeeds = item.MealSpecialNeeds;
|
|
|
+ param.ShippingSpaceSpecialNeeds = item.ShippingSpaceSpecialNeeds;
|
|
|
+ param.ShippingSpaceTypeId = item.ShippingSpaceTypeId;
|
|
|
+ param.Id = item.Id;
|
|
|
+
|
|
|
+ TourClientListInfoArr.Add(param);
|
|
|
+ }
|
|
|
+
|
|
|
+ GroupProcessOperationDtoParam.PortType = dto.PortType;
|
|
|
+ GroupProcessOperationDtoParam.TourClientListInfos = TourClientListInfoArr;
|
|
|
+ GroupProcessOperationDtoParam.VisitDate = DateTime.TryParse(GroupProcessOperationDtoParam.VisitDate, out timeParam) ? timeParam.ToString("yyyy-MM-dd") : "";
|
|
|
+ GroupProcessOperationDtoParam.TontractTime = DateTime.TryParse(GroupProcessOperationDtoParam.TontractTime, out timeParam) ? timeParam.ToString("yyyy-MM-dd") : "";
|
|
|
+
|
|
|
+ result.Data = GroupProcessOperationDtoParam;
|
|
|
+ }
|
|
|
+
|
|
|
}
|
|
|
else result.Msg = "暂无该团组信息";
|
|
|
}
|