From 254b0f64e811c6e4dc3fceb0c30f97635d4411a6 Mon Sep 17 00:00:00 2001 From: jianghaiqing Date: Wed, 21 Aug 2024 14:59:35 +0800 Subject: [PATCH 1/3] =?UTF-8?q?=E6=96=B0=E5=A2=9E=E8=B5=B7=E8=BF=90?= =?UTF-8?q?=E6=B8=AF=E6=9C=AA=E6=8F=90=E7=AE=B1=E9=80=9A=E7=9F=A5=E6=A8=A1?= =?UTF-8?q?=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Op/Templates/ContainerPickUpMSK.cshtml | 107 ++++++++++++++++++ 1 file changed, 107 insertions(+) create mode 100644 ds-wms-service/DS.WMS.Core/Op/Templates/ContainerPickUpMSK.cshtml 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)邮件发给订舱代理联系人,抄送我司销售/客服和操作/单证;未勾选推送的订舱代理,仅推送我司干系人! *@ + From aad5b2322dd3ebcecf41c31ab188c2e4d4034164 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B5=87=E6=96=87=E9=BE=99?= Date: Wed, 21 Aug 2024 14:24:10 +0800 Subject: [PATCH 2/3] =?UTF-8?q?=E5=BE=80=E6=9D=A5=E5=8D=95=E4=BD=8D?= =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=9B=BD=E5=86=85=E5=90=8C=E8=A1=8C=E3=80=81?= =?UTF-8?q?=E5=9B=BD=E5=A4=96=E5=90=8C=E8=A1=8C?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../DS.WMS.Core/Info/Entity/InfoClientTag.cs | 13 +++++++++++++ 1 file changed, 13 insertions(+) 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 /// From ab7fbaabad5fa9a662f7bff0c6be27cb3600b72c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=B5=87=E6=96=87=E9=BE=99?= Date: Wed, 21 Aug 2024 15:05:42 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E8=8E=B7=E5=8F=96=E6=89=80=E6=9C=89?= =?UTF-8?q?=E5=BE=80=E6=9D=A5=E5=8D=95=E4=BD=8D=E4=B8=8B=E6=8B=89=E5=88=97?= =?UTF-8?q?=E8=A1=A8=EF=BC=8C=E5=A2=9E=E5=8A=A0=E6=9F=A5=E8=AF=A2=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Sys/Interface/IClientCommonService.cs | 4 +- .../Sys/Method/ClientCommonService.cs | 76 ++++++++++++------- .../Controllers/ClientCommonController.cs | 18 ++--- 3 files changed, 59 insertions(+), 39 deletions(-) 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;