123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990 |
- using OASystem.Domain;
- using OASystem.Domain.Dtos;
- using OASystem.Domain.Dtos.UserDto;
- using OASystem.Domain.Entities.Customer;
- using OASystem.Domain.Entities.Groups;
- using OASystem.Domain.ViewModels.CRM;
- using OASystem.Domain.ViewModels.Group;
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace OASystem.Infrastructure.Repositories.CRM
- {
- /// <summary>
- /// 签证客户 仓库
- /// </summary>
- public class VisaDeleClientRepository : BaseRepository<Crm_DeleClient, VisaDeleClientView>
- {
- public VisaDeleClientRepository(SqlSugarClient sqlSugar) :
- base(sqlSugar)
- { }
- /// <summary>
- /// 签证客户list
- /// </summary>
- /// <param name="loginDto"></param>
- /// <returns></returns>
- public async Task<Result> GetCrmList(DtoBase dto)
- {
- Result result = new Result() { Code = -2 };
- if (dto.PortType == 1 || dto.PortType == 2)
- {
- string sql = string.Format(@"Select cdc.Id,LastName+FirstName ClientName,ccc.CompanyName,Sex,Marriage,
- Phone LandlinePhone,Tel,crmCard1.CertNo IDNo,crmCard2.CertNo PassportNo
- From Crm_DeleClient cdc
- Left Join Crm_CustomerCompany ccc On cdc.crmCompanyId = ccc.Id
- Left Join Crm_CustomerCert crmCard1 On crmCard1.SdId = 773 And cdc.Id = crmCard1.DcId
- Left Join Crm_CustomerCert crmCard2 On crmCard2.SdId = 774 And cdc.Id = crmCard2.DcId ");
- var clientList = await _sqlSugar.SqlQueryable<VisaDeleClientListView>(sql).ToListAsync();
- if (clientList.Count > 0)
- {
- result.Code = 0;
- result.Msg = "成功!";
- result.Data = clientList;
- }
- else
- {
- result.Msg = "暂无数据!";
- }
- }
- return result;
- }
- /// <summary>
- /// 签证客户操作
- /// </summary>
- /// <param name="loginDto"></param>
- /// <returns></returns>
- public async Task<Result> CrmClinetoperation(LoginDto loginDto)
- {
- Result result = new Result() { Code = -2 };
- return result;
- }
- /// <summary>
- /// 签证客户 新增
- /// </summary>
- /// <param name="loginDto"></param>
- /// <returns></returns>
- public async Task<int> CrmClinetAdd(Crm_DeleClient client)
- {
- int addId = -1;
-
- return addId;
- }
- }
- }
|