diff --git a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs index 41e9e3c6..2c78741e 100644 --- a/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs +++ b/Myshipping.Application/Service/BookingOrder/BookingOrderService.cs @@ -113,6 +113,7 @@ namespace Myshipping.Application private readonly SqlSugarRepository _djycustomer; private readonly SqlSugarRepository _bookingTemplate; private readonly SqlSugarRepository _paraGoodsInfoRepository; + private readonly SqlSugarRepository _paraContractNoInfoRepository; private readonly IHttpContextAccessor _httpContextAccessor; private readonly IBookingGoodsStatusConfigService _GoodsConfig; const string CONST_MAPPING_MODULE = "BOOK_OR_CLOSING"; @@ -128,7 +129,7 @@ namespace Myshipping.Application SqlSugarRepository repOrderUrl, SqlSugarRepository repOrderContact, SqlSugarRepository repSampleBill, SqlSugarRepository djycustomer, SqlSugarRepository excelrep, SqlSugarRepository repUserMail, SqlSugarRepository goodsStatus, SqlSugarRepository goodsStatusConfig, SqlSugarRepository repTenant, SqlSugarRepository repBookingStatus, SqlSugarRepository bookingEDIExt, SqlSugarRepository serviceItem, - IHttpContextAccessor httpContextAccessor, IBookingGoodsStatusConfigService GoodsConfig) + SqlSugarRepository paraContractNoInfoRepository, IHttpContextAccessor httpContextAccessor, IBookingGoodsStatusConfigService GoodsConfig) { this._logger = logger; this._rep = rep; @@ -162,6 +163,7 @@ namespace Myshipping.Application this._bookingTemplate = bookingTemplate; this._djycustomer = djycustomer; this._paraGoodsInfoRepository = paraGoodsInfoRepository; + this._paraContractNoInfoRepository = paraContractNoInfoRepository; _httpContextAccessor = httpContextAccessor; _GoodsConfig = GoodsConfig; } @@ -5150,11 +5152,6 @@ namespace Myshipping.Application return allData; } - #endregion - - - - /// ///获取下拉前10条接口 /// @@ -5173,7 +5170,7 @@ namespace Myshipping.Application var GWDL = _djycustomer.Where(x => x.PropString.Contains("out_agent")).Take(10).ToList(); //仓库 - var CK = _djycustomer.Where(x => x.PropString.Contains("warehouse") ).Take(10).ToList(); + var CK = _djycustomer.Where(x => x.PropString.Contains("warehouse")).Take(10).ToList(); var Portload = _cache.GetAllCodePortLoad().Result.Take(10).ToList(); @@ -5184,9 +5181,9 @@ namespace Myshipping.Application var Customer = _djycustomer.AsQueryable().Filter(null, true).Where(x => x.TenantId == UserManager.TENANT_ID).Take(10).ToList(); var Forwarder = _cache.GetAllCodeForwarder().Result.Take(10).ToList(); - var Contractno = _paraGoodsInfoRepository.AsQueryable().OrderBy("GOODS_CODE asc").Take(50).ToList().Select(t => t.Adapt()).ToList(); + var GoodsName = _paraGoodsInfoRepository.AsQueryable().OrderBy("GOODS_CODE asc").Take(50).ToList().Select(t => t.Adapt()).ToList(); var superAdmin = UserManager.IsSuperAdmin; - + var contractno = _paraContractNoInfoRepository.AsQueryable().Take(10).Select(t => t.Adapt()).ToList(); var User = _repUser.AsQueryable().InnerJoin((u, e) => u.Id == e.Id) .InnerJoin((u, e, o) => e.OrgId == o.Id) .InnerJoin((u, e, o, t) => u.TenantId == t.Id) @@ -5203,13 +5200,20 @@ namespace Myshipping.Application Port = Port, Template = Template, Customer = Customer, - Contractno = Contractno, + GoodsName = GoodsName, User = User, - Forwarder= Forwarder, - Service= Service + Forwarder = Forwarder, + Service = Service, + contractno = contractno }; return obj; } + #endregion + + + + + } } diff --git a/Myshipping.Application/Service/DataSync/DataSyncService.cs b/Myshipping.Application/Service/DataSync/DataSyncService.cs index a3bcce27..07ff0c2d 100644 --- a/Myshipping.Application/Service/DataSync/DataSyncService.cs +++ b/Myshipping.Application/Service/DataSync/DataSyncService.cs @@ -1867,19 +1867,50 @@ namespace Myshipping.Application #region 下载数据 + + + + + #endregion #region 其他 /// - /// 测试用 + /// /// + /// /// - [HttpGet("/DataSync/Test"), ApiUser(ApiCode = "Test")] - public async Task Test() - { - return $"当前用户:{UserManager.UserId} {UserManager.Name} ,当前租户:{UserManager.TENANT_ID} {UserManager.TENANT_NAME},管理员类型:{(UserManager.IsSuperAdmin ? "超级管理员" : (UserManager.IsTenantAdmin ? "租户管理员" : "普通用户"))}"; + [NonAction] + public async Task> SendBookingOrder(List ids) { + + + if (ids.Count()==0) { + throw Oops.Bah("请上传正确数据"); + } + var dto = await _rep.AsQueryable().Filter(null, true).Where(x => ids.Contains(x.Id) && x.TenantId == UserManager.TENANT_ID && x.ParentId == 0).Select(t => t.Adapt()).ToListAsync(); + foreach (var item in dto) + { + var ctn = await _repCtn.AsQueryable().Filter(null, true).Where(x => x.BILLID == item.Id).ToListAsync(); + + + + + + + + + } + + + + + + return dto; + } + + + - } #endregion } } diff --git a/Myshipping.Application/Service/DataSync/Dto/BookingOrderDto.cs b/Myshipping.Application/Service/DataSync/Dto/BookingOrderDto.cs index 1e44080c..326cbbbd 100644 --- a/Myshipping.Application/Service/DataSync/Dto/BookingOrderDto.cs +++ b/Myshipping.Application/Service/DataSync/Dto/BookingOrderDto.cs @@ -11,7 +11,7 @@ namespace Myshipping.Application.Service.DataSync.Dto ///// ///// 主键 ///// - //public long Id { get; set; } + public long Id { get; set; } /// /// 业务编号 @@ -697,9 +697,6 @@ namespace Myshipping.Application.Service.DataSync.Dto ///货物状态 /// public List GoodsStatus { get; set; } - - - }