diff --git a/ds-wms-service/DS.WMS.Core/Info/Entity/InfoClientTag.cs b/ds-wms-service/DS.WMS.Core/Info/Entity/InfoClientTag.cs index ee1a8b9d..40d230a6 100644 --- a/ds-wms-service/DS.WMS.Core/Info/Entity/InfoClientTag.cs +++ b/ds-wms-service/DS.WMS.Core/Info/Entity/InfoClientTag.cs @@ -165,6 +165,19 @@ public class InfoClientTag : BaseModelV2 /// [SugarColumn(ColumnDescription = "是否约主", DefaultValue = "0")] public bool? IsContract { get; set; } = false; + + /// + /// 是否国内同行 + /// + [SugarColumn(ColumnDescription = "是否国内同行", DefaultValue = "0")] + public bool IsDomesticPeers { get; set; } + + /// + /// 是否国内同行 + /// + [SugarColumn(ColumnDescription = "是否国外同行", DefaultValue = "0")] + public bool IsForeignCounterparts { get; set; } + /// /// 机构Id /// diff --git a/ds-wms-service/DS.WMS.Core/Op/Templates/ContainerPickUpMSK.cshtml b/ds-wms-service/DS.WMS.Core/Op/Templates/ContainerPickUpMSK.cshtml new file mode 100644 index 00000000..5e812f43 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/Op/Templates/ContainerPickUpMSK.cshtml @@ -0,0 +1,107 @@ +@* @model DS.WMS.Core.Op.Entity.MailTemplateModel *@ +@{ + var item = Model.Primary; +} + + + +*** Auto Email, please reply to all (delete sender Admin)!If only reply to sender, we will not be able to find and deal with it! *** +
+Dear @Model.Contacts + +
+ RE: BOOKING - JOB NO. +
+ +请查看附件中的订舱委托,请2小时内先行回复订舱号给我们,并帮忙催促船东尽快放舱,如下信息同订舱委托一致,便于您查阅! + +CARRIER:@item.Carrier +S/Q:XX +ETD : @item.ETD + +POL: @item.LoadPort +POD: @item.DischargePort +FPOD: @item.DeliveryPlace +VOL: XX +Commdity: XX(取中文品名) +HS CODE: @item.HSCode +POD FREE TIME: +REMARK: +(取供应商备注) + + +此票订舱我司对接同事的联系方式如下,任何问题请及时跟我们沟通,谢谢! + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
CN NameNameTel No.Mobile/Wechat/QQEmailPosition
邵 芳Candy0532-8068838713375570007 2853083550candy@sunniness.netCooperation
魏涛Wilson0532-8068835313969858993 2853083555ope@sunniness.netOP manager
徐平平Cathy0532-8068835013969662965 2853083551opg@sunniness.netDocument
+ +
+
+ @* Tks + B’rgds + Candy SHAO 邵芳 (此处用当票操作的信息) + General Manager | SUNNINESS LOGISTICS CO.,LTD. + TEL: +86-0532-80688387 |MB./We chat: +86-18866622731|QQ:2853083553 | Email:candy@sunniness.net *@ +
+
+ +@* 此邮件模板是订舱委托推送的邮件模板,在商务订单审核通过后,自动生成,并推送: +1)蓝色是调取系统数据、红色是醒目提醒; +2)订舱委托PDF格式作为附件一起发出 +3)邮件发给订舱代理联系人,抄送我司销售/客服和操作/单证;未勾选推送的订舱代理,仅推送我司干系人! *@ + diff --git a/ds-wms-service/DS.WMS.Core/Sys/Interface/IClientCommonService.cs b/ds-wms-service/DS.WMS.Core/Sys/Interface/IClientCommonService.cs index 2b112c65..ec3fdac1 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Interface/IClientCommonService.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Interface/IClientCommonService.cs @@ -117,8 +117,10 @@ public interface IClientCommonService /// /// 获取所有往来单位下拉列表 /// + /// + /// /// - public DataResult> GetAllClientList(); + public DataResult> GetAllClientList(long? id = null, string? type = null); /// /// 获取船公司下拉列表 /// diff --git a/ds-wms-service/DS.WMS.Core/Sys/Method/ClientCommonService.cs b/ds-wms-service/DS.WMS.Core/Sys/Method/ClientCommonService.cs index 0352f10a..ece3c7cc 100644 --- a/ds-wms-service/DS.WMS.Core/Sys/Method/ClientCommonService.cs +++ b/ds-wms-service/DS.WMS.Core/Sys/Method/ClientCommonService.cs @@ -57,7 +57,7 @@ public class ClientCommonService : IClientCommonService /// 获取航线操作员列表 /// /// - public async Task>> GetLaneUserList(string queryKey = "") + public async Task>> GetLaneUserList(string queryKey = "") { var data = await db.Queryable() .Where(a => a.Status == StatusEnum.Enable.ToEnumInt() && a.IsLaner == true) @@ -83,7 +83,7 @@ public class ClientCommonService : IClientCommonService { Id = a.Id, PinYinCode = a.ShortName + "(" + a.CodeName + ")" - },true + }, true ).Take(20).WithCache($"{SqlSugarCacheConst.InfoClient}{user.TenantId}").ToListAsync(); return await Task.FromResult(DataResult>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess)); } @@ -91,15 +91,16 @@ public class ClientCommonService : IClientCommonService /// 获取船公司下拉列表 /// /// - public async Task>> GetCarrierSelectList(string queryKey = "") { + public async Task>> GetCarrierSelectList(string queryKey = "") + { var tenantDb = saasService.GetBizDbScopeById(user.TenantId); var list = await tenantDb.Queryable() .WhereIF(!string.IsNullOrEmpty(queryKey), a => a.Code.Contains(queryKey) || a.CnName.Contains(queryKey)) .Select(a => new CodeCarrierRes() - { - PinYinCode = a.CnName + "(" + a.Code + ")", - }, + { + PinYinCode = a.CnName + "(" + a.Code + ")", + }, true) .Take(20) .WithCache($"{SqlSugarCacheConst.Carrier}{user.TenantId}") @@ -128,10 +129,10 @@ public class ClientCommonService : IClientCommonService /// 获取商品下拉列表-客户端 /// /// - public async Task>> GetClientGoodsList(string queryKey ="") + public async Task>> GetClientGoodsList(string queryKey = "") { var tenantDb = saasService.GetBizDbScopeById(user.TenantId); - var list = await tenantDb.Queryable().Where(a=> a.Status == StatusEnum.Enable) + var list = await tenantDb.Queryable().Where(a => a.Status == StatusEnum.Enable) .WhereIF(!string.IsNullOrEmpty(queryKey), a => a.GoodsCode.Contains(queryKey) || a.GoodName.Contains(queryKey)) .Select(a => new CodeGoodsSelectRes() { @@ -163,7 +164,7 @@ public class ClientCommonService : IClientCommonService /// /// public async Task>> GetUseEmailListByIds(long[] ids) - { + { var data = await db.Queryable() .Where(a => a.Status == StatusEnum.Enable.ToEnumInt() && ids.Contains(a.Id)) .Select() @@ -178,7 +179,7 @@ public class ClientCommonService : IClientCommonService /// /// public async Task>> GetUserListByCode(string code, string queryKey = "") - { + { code = code.ToLower(); var data = await db.Queryable() .Where(a => a.Status == StatusEnum.Enable.ToEnumInt()) @@ -234,13 +235,13 @@ public class ClientCommonService : IClientCommonService var dictvalue = db.Queryable().InnerJoin((a, b) => a.TypeId == b.Id) .Where((a, b) => b.Code == "fee_unit").Select((a, b) => a.Value).ToList(); - if (dictvalue.Where(x=>x ==req.Code).Any()) + if (dictvalue.Where(x => x == req.Code).Any()) { var data = GetSeaExportUnit(info, req.Code); return DataResult.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess); } else - { + { var codeCtns = tenantDb.Queryable().Where(x => x.Status == StatusEnum.Enable).ToList(); if (codeCtns.Where(x => x.CtnName == req.Code).Any()) @@ -263,7 +264,7 @@ public class ClientCommonService : IClientCommonService return DataResult.Failed("没有维护该箱型的集装箱信息!"); } } - + } else { @@ -290,7 +291,7 @@ public class ClientCommonService : IClientCommonService data.Quantity = seaExport.PKGS; break; case "JF"://计费吨 - data.Quantity = seaExport.KGS/1000> seaExport.CBM? seaExport.KGS/1000: seaExport.CBM; + data.Quantity = seaExport.KGS / 1000 > seaExport.CBM ? seaExport.KGS / 1000 : seaExport.CBM; break; //默认 default: @@ -336,7 +337,7 @@ public class ClientCommonService : IClientCommonService .WhereIF(code == "tradingagency", (a, b) => b.IsTradingAgency == true) .WhereIF(code == "shipagency", (a, b) => b.IsShipAgency == true) .WhereIF(code == "enterprise", (a, b) => b.IsEnterprise == true) - .WhereIF(code == "contract", (a, b) => b.IsContract == true) + .WhereIF(code == "contract", (a, b) => b.IsContract == true) .Select((a, b) => new ClientSelectRes { Id = a.Id, @@ -355,14 +356,14 @@ public class ClientCommonService : IClientCommonService return DataResult.Failed("业务信息不存在!"); } - var data = GetSeaExportClientInfo(info,code); + var data = GetSeaExportClientInfo(info, code); data.ClientList = list; return DataResult.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess); } else { return DataResult.Failed("非法业务类型"); - } + } } private ClientSelectInfoRes GetSeaExportClientInfo(SeaExport seaExport, string code) @@ -370,7 +371,7 @@ public class ClientCommonService : IClientCommonService var data = new ClientSelectInfoRes(); switch (code) - { + { case "carrier": data.ClientId = seaExport.CarrierId; data.ClientName = seaExport.Carrier; @@ -1134,7 +1135,7 @@ public class ClientCommonService : IClientCommonService /// 根据类型获取往来单位下拉列表 /// /// - public async Task>> GetClientListByCode(string code,string queryKey ="") + public async Task>> GetClientListByCode(string code, string queryKey = "") { var tenantDb = saasService.GetBizDbScopeById(user.TenantId); @@ -1176,24 +1177,41 @@ public class ClientCommonService : IClientCommonService ).Take(20).WithCache($"{SqlSugarCacheConst.InfoClient}{user.TenantId}").ToListAsync(); return await Task.FromResult(DataResult>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess)); } + /// /// 获取所有往来单位下拉列表 /// + /// + /// /// - public DataResult> GetAllClientList() + public DataResult> GetAllClientList(long? id = null, string? type = null) { var tenantDb = saasService.GetBizDbScopeById(user.TenantId); - var data = tenantDb.Queryable() - .InnerJoin((a, b) => a.Id == b.ClientId) - .Where((a, b) => a.Status == StatusEnum.Enable.ToEnumInt()) - .Select((a, b) => new ClientSelectRes + + List conditions = []; + if (!string.IsNullOrEmpty(type)) + { + conditions.Add(new ConditionalModel + { + FieldName = "b.Is" + type.ToUpperCamelCase(), + FieldValue = "1", + CSharpTypeName = "int", + ConditionalType = ConditionalType.Equal + }); + } + + var data = tenantDb.Queryable().InnerJoin((a, b) => a.Id == b.ClientId) + .Where(a => a.Status == StatusEnum.Enable.ToEnumInt()) + .Where(conditions) + .WhereIF(id.GetValueOrDefault() > 0, a => a.Id != id) + .Select(a => new ClientSelectRes { Id = a.Id, CodeName = a.CodeName, ShortName = a.ShortName, EnShortName = a.EnShortName - } - ).ToList(); + }).ToList(); + return DataResult>.Success("获取数据成功!", data, MultiLanguageConst.DataQuerySuccess); } /// @@ -1645,7 +1663,7 @@ public class ClientCommonService : IClientCommonService /// 获取包装类型下拉列表 /// /// - public DataResult> GetPackageSelectList(string queryKey ="") + public DataResult> GetPackageSelectList(string queryKey = "") { var tenantDb = saasService.GetBizDbScopeById(user.TenantId); var data = tenantDb.Queryable() @@ -1735,7 +1753,7 @@ public class ClientCommonService : IClientCommonService /// 获取单证员列表 /// /// - public DataResult> GetVouchingClerkList(string queryKey ="") + public DataResult> GetVouchingClerkList(string queryKey = "") { var data = db.Queryable() .Where(a => a.Status == StatusEnum.Enable.ToEnumInt() && a.IsVouchingClerk == true) @@ -1852,7 +1870,7 @@ public class ClientCommonService : IClientCommonService public DataResult GetUserQuerySet(string permissionId, int tagNo = 0) { var info = db.Queryable() - .Where(x => x.UserId == long.Parse(user.UserId) && x.PermissionId == long.Parse(permissionId)&& x.TagNo == tagNo).First(); + .Where(x => x.UserId == long.Parse(user.UserId) && x.PermissionId == long.Parse(permissionId) && x.TagNo == tagNo).First(); return DataResult.Success(info); } diff --git a/ds-wms-service/DS.WMS.MainApi/Controllers/ClientCommonController.cs b/ds-wms-service/DS.WMS.MainApi/Controllers/ClientCommonController.cs index f894ce4e..c8d45884 100644 --- a/ds-wms-service/DS.WMS.MainApi/Controllers/ClientCommonController.cs +++ b/ds-wms-service/DS.WMS.MainApi/Controllers/ClientCommonController.cs @@ -1,5 +1,4 @@ using DS.Module.Core; -using DS.Module.Core.Extensions; using DS.WMS.Core.Code.Dtos; using DS.WMS.Core.Fee.Dtos; using DS.WMS.Core.Info.Dtos; @@ -7,9 +6,7 @@ using DS.WMS.Core.Op.Dtos; using DS.WMS.Core.Sys.Dtos; using DS.WMS.Core.Sys.Entity; using DS.WMS.Core.Sys.Interface; -using Microsoft.AspNetCore.Authorization; using Microsoft.AspNetCore.Mvc; -using SqlSugar; namespace DS.WMS.MainApi.Controllers; @@ -180,6 +177,7 @@ public class ClientCommonController : ApiController var res = _invokeService.GetClientSelectInfoByCode(req); return res; } + /// /// 获取往来单位下拉集合列表 /// @@ -191,6 +189,7 @@ public class ClientCommonController : ApiController var res = await _invokeService.GetMultiClientList(); return res; } + /// /// 提取汇率信息 先提取CodeConfig 参数ExchangeRateType(ETD\AccountDate\CreateTime) 再提取SysConfig配置,最后默认取业务订单ETD /// @@ -255,7 +254,7 @@ public class ClientCommonController : ApiController /// [HttpGet] [Route("GetClientListByCode")] - public async Task>> GetClientListByCode([FromQuery]string code, string queryKey = "") + public async Task>> GetClientListByCode([FromQuery] string code, string queryKey = "") { var res = await _invokeService.GetClientListByCode(code, queryKey); return res; @@ -263,12 +262,13 @@ public class ClientCommonController : ApiController /// /// 获取所有往来单位下拉列表 /// + /// 当前往来单位的ID(可空) + /// 类型字符串(与系统配置保持一致,可空) /// - [HttpGet] - [Route("GetAllClientList")] - public DataResult> GetAllClientList() + [HttpGet, Route("GetAllClientList")] + public DataResult> GetAllClientList([FromQuery] long? id = null, [FromQuery] string? type = null) { - var res = _invokeService.GetAllClientList(); + var res = _invokeService.GetAllClientList(id, type); return res; } /// @@ -620,7 +620,7 @@ public class ClientCommonController : ApiController /// [HttpGet] [Route("GetPackageSelectList")] - public DataResult> GetPackageSelectList([FromQuery]string queryKey = "") + public DataResult> GetPackageSelectList([FromQuery] string queryKey = "") { var res = _invokeService.GetPackageSelectList(queryKey); return res;