|
@@ -1,10 +1,12 @@
|
|
-using Newtonsoft.Json;
|
|
|
|
|
|
+using AutoMapper;
|
|
|
|
+using Newtonsoft.Json;
|
|
using NPOI.OpenXmlFormats.Wordprocessing;
|
|
using NPOI.OpenXmlFormats.Wordprocessing;
|
|
using OASystem.Domain;
|
|
using OASystem.Domain;
|
|
using OASystem.Domain.Dtos;
|
|
using OASystem.Domain.Dtos;
|
|
using OASystem.Domain.Dtos.Financial;
|
|
using OASystem.Domain.Dtos.Financial;
|
|
using OASystem.Domain.Dtos.Groups;
|
|
using OASystem.Domain.Dtos.Groups;
|
|
using OASystem.Domain.Dtos.UserDto;
|
|
using OASystem.Domain.Dtos.UserDto;
|
|
|
|
+using OASystem.Domain.Entities.Customer;
|
|
using OASystem.Domain.Entities.Groups;
|
|
using OASystem.Domain.Entities.Groups;
|
|
using OASystem.Domain.ViewModels.CRM;
|
|
using OASystem.Domain.ViewModels.CRM;
|
|
using OASystem.Domain.ViewModels.Financial;
|
|
using OASystem.Domain.ViewModels.Financial;
|
|
@@ -30,16 +32,18 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
private readonly SetDataRepository _setDataRepository;
|
|
private readonly SetDataRepository _setDataRepository;
|
|
private readonly UsersRepository _usersRepository;
|
|
private readonly UsersRepository _usersRepository;
|
|
private readonly TaskAssignmentRepository _taskAssignmentRep;
|
|
private readonly TaskAssignmentRepository _taskAssignmentRep;
|
|
|
|
+ private readonly IMapper _mapper;
|
|
//private readonly TeamRateRepository _teamRateRep;
|
|
//private readonly TeamRateRepository _teamRateRep;
|
|
//public readonly Logs _logs;
|
|
//public readonly Logs _logs;
|
|
|
|
|
|
public DelegationInfoRepository(SqlSugarClient sqlSugar, SetDataRepository setDataRepository, UsersRepository usersRepository,
|
|
public DelegationInfoRepository(SqlSugarClient sqlSugar, SetDataRepository setDataRepository, UsersRepository usersRepository,
|
|
- TaskAssignmentRepository taskAssignmentRep)
|
|
|
|
|
|
+ TaskAssignmentRepository taskAssignmentRep, IMapper mapper)
|
|
: base(sqlSugar)
|
|
: base(sqlSugar)
|
|
{
|
|
{
|
|
_setDataRepository = setDataRepository;
|
|
_setDataRepository = setDataRepository;
|
|
_usersRepository = usersRepository;
|
|
_usersRepository = usersRepository;
|
|
_taskAssignmentRep = taskAssignmentRep;
|
|
_taskAssignmentRep = taskAssignmentRep;
|
|
|
|
+ _mapper = mapper;
|
|
//_teamRateRep = teamRateRep;
|
|
//_teamRateRep = teamRateRep;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -267,8 +271,52 @@ namespace OASystem.Infrastructure.Repositories.Groups
|
|
result.Code = 0;
|
|
result.Code = 0;
|
|
result.Msg = "成功!";
|
|
result.Msg = "成功!";
|
|
result.Data = _DelegationInfo;
|
|
result.Data = _DelegationInfo;
|
|
|
|
+
|
|
|
|
+
|
|
|
|
+ if (dto.PortType == 2)
|
|
|
|
+ {
|
|
|
|
+ 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<TourClientListInfo>();
|
|
|
|
+
|
|
|
|
+ foreach (var item in _DeleClients)
|
|
|
|
+ {
|
|
|
|
+ var param = new TourClientListInfo();
|
|
|
|
+ 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 = clientInfo.BirthDay;
|
|
|
|
+ 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;
|
|
|
|
+
|
|
|
|
+ TourClientListInfoArr.Add(param);
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ GroupProcessOperationDtoParam.TourClientListInfos = TourClientListInfoArr;
|
|
|
|
+ result.Data = GroupProcessOperationDtoParam;
|
|
|
|
+ }
|
|
|
|
+
|
|
}
|
|
}
|
|
- else result.Msg = "暂无该团组信息";
|
|
|
|
|
|
+ else result.Msg = "暂无该团组信息";
|
|
}
|
|
}
|
|
|
|
|
|
return result;
|
|
return result;
|