From 131990952061edc0e077f9585e8bdef1cf7d4503 Mon Sep 17 00:00:00 2001 From: cjy Date: Mon, 8 Jul 2024 15:44:01 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Op/Dtos/ShippingBillTemplateRes.cs | 4 + .../Op/Dtos/ShippingBillTemplateSelectRes.cs | 4 + .../Entity/SeaExportShippingBillTemplate.cs | 6 + .../Op/Method/ShippingBillTemplateService.cs | 7 +- .../DS.WMS.OpApi/DS.WMS.OpApi.csproj.user | 6 + .../DS.WMS.OpApi/Logs/internal-nlog.txt | 28 +++++ .../PublishProfiles/FolderProfile.pubxml.user | 12 ++ ds-wms-service/DS.WMS.Test/OpTest.cs | 4 + ds-wms-service/DS.WMS.Test/SaasTest.cs | 2 +- ds-wms-service/DS.WMS.Test/appsettings.json | 114 ++++++++++-------- 10 files changed, 137 insertions(+), 50 deletions(-) create mode 100644 ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user create mode 100644 ds-wms-service/DS.WMS.OpApi/Properties/PublishProfiles/FolderProfile.pubxml.user diff --git a/ds-wms-service/DS.WMS.Core/Op/Dtos/ShippingBillTemplateRes.cs b/ds-wms-service/DS.WMS.Core/Op/Dtos/ShippingBillTemplateRes.cs index 0cd14df8..d3b8af8d 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Dtos/ShippingBillTemplateRes.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Dtos/ShippingBillTemplateRes.cs @@ -47,6 +47,10 @@ namespace DS.WMS.Core.Op.Dtos /// public string Type { get; set; } /// + /// 模板内容 + /// + public string Content { get; set; } + /// /// 备注 /// public string Note { get; set; } = ""; diff --git a/ds-wms-service/DS.WMS.Core/Op/Dtos/ShippingBillTemplateSelectRes.cs b/ds-wms-service/DS.WMS.Core/Op/Dtos/ShippingBillTemplateSelectRes.cs index 01750f36..cdca8b68 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Dtos/ShippingBillTemplateSelectRes.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Dtos/ShippingBillTemplateSelectRes.cs @@ -47,6 +47,10 @@ namespace DS.WMS.Core.Op.Dtos /// public string Type { get; set; } /// + /// 模板内容 + /// + public string Content { get; set; } + /// /// 备注 /// public string Note { get; set; } = ""; diff --git a/ds-wms-service/DS.WMS.Core/Op/Entity/SeaExportShippingBillTemplate.cs b/ds-wms-service/DS.WMS.Core/Op/Entity/SeaExportShippingBillTemplate.cs index 49f05c50..3fc05e11 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Entity/SeaExportShippingBillTemplate.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Entity/SeaExportShippingBillTemplate.cs @@ -45,6 +45,12 @@ namespace DS.WMS.Core.Op.Entity /// [SugarColumn(ColumnDescription = "电话", IsNullable = true, Length = 50)] public string Tel { get; set; } + + /// + /// 模板内容 + /// + [SugarColumn(ColumnDescription = "模板内容", IsNullable = true, ColumnDataType = StaticConfig.CodeFirst_BigString)] + public string Content { get; set; } /// /// 类型 1 收 2 发 3 通 /// diff --git a/ds-wms-service/DS.WMS.Core/Op/Method/ShippingBillTemplateService.cs b/ds-wms-service/DS.WMS.Core/Op/Method/ShippingBillTemplateService.cs index 4317ef3b..aae6fc3f 100644 --- a/ds-wms-service/DS.WMS.Core/Op/Method/ShippingBillTemplateService.cs +++ b/ds-wms-service/DS.WMS.Core/Op/Method/ShippingBillTemplateService.cs @@ -7,6 +7,7 @@ using DS.WMS.Core.Fee.Entity; using DS.WMS.Core.Op.Dtos; using DS.WMS.Core.Op.Entity; using DS.WMS.Core.Op.Interface; +using DS.WMS.Core.Sys.Interface; using Mapster; using Microsoft.Extensions.DependencyInjection; using SqlSugar; @@ -20,6 +21,7 @@ namespace DS.WMS.Core.Op.Method private readonly ISqlSugarClient db; private readonly IUser user; private readonly ISaasDbService saasService; + private readonly ICommonService commonService; /// /// /// @@ -30,6 +32,7 @@ namespace DS.WMS.Core.Op.Method db = _serviceProvider.GetRequiredService(); user = _serviceProvider.GetRequiredService(); saasService = _serviceProvider.GetRequiredService(); + commonService = _serviceProvider.GetRequiredService(); } /// @@ -75,7 +78,9 @@ namespace DS.WMS.Core.Op.Method } else { - var info = tenantDb.Queryable().Where(x => x.Id == req.Id).First(); + //var info = tenantDb.Queryable().Where(x => x.Id == req.Id).First(); + var operationRule = commonService.GetOperationRuleConditional(); + var info = tenantDb.Queryable().Where(x => x.Id == req.Id).Where(operationRule).First(); info = req.Adapt(info); diff --git a/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user b/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user new file mode 100644 index 00000000..4edfe4b7 --- /dev/null +++ b/ds-wms-service/DS.WMS.OpApi/DS.WMS.OpApi.csproj.user @@ -0,0 +1,6 @@ + + + + D:\Code\DS\ds8-solution-pro\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml + + \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.OpApi/Logs/internal-nlog.txt b/ds-wms-service/DS.WMS.OpApi/Logs/internal-nlog.txt index 6af2f579..02b259c5 100644 --- a/ds-wms-service/DS.WMS.OpApi/Logs/internal-nlog.txt +++ b/ds-wms-service/DS.WMS.OpApi/Logs/internal-nlog.txt @@ -278,3 +278,31 @@ 2024-06-03 15:14:43.2026 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config 2024-06-03 15:14:43.2191 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile 2024-06-03 15:14:43.2480 Info Configuration initialized. +2024-07-08 14:41:44.8708 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-08 14:41:44.8901 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-08 14:41:44.8901 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-08 14:41:44.9314 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-08 14:41:44.9314 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution-pro\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config +2024-07-08 14:41:44.9483 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-08 14:41:44.9483 Info Configuration initialized. +2024-07-08 14:42:17.8391 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-08 14:42:17.8633 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-08 14:42:17.8633 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-08 14:42:17.8826 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-08 14:42:17.8887 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution-pro\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config +2024-07-08 14:42:17.8887 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-08 14:42:17.9003 Info Configuration initialized. +2024-07-08 14:47:13.5787 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-08 14:47:13.6040 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-08 14:47:13.6040 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-08 14:47:13.6294 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-08 14:47:13.6405 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution-pro\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config +2024-07-08 14:47:13.6405 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-08 14:47:13.6566 Info Configuration initialized. +2024-07-08 15:05:25.7779 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-08 15:05:25.8097 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-08 15:05:25.8097 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-08 15:05:25.8498 Info NLog, Version=5.0.0.0, Culture=neutral, PublicKeyToken=5120e14c03d0593c. File version: 5.2.8.2366. Product version: 5.2.8+f586f1341c46fa38aaaff4c641e7f0fa7e813943. GlobalAssemblyCache: False +2024-07-08 15:05:25.8638 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\Code\DS\ds8-solution-pro\ds-wms-service\DS.WMS.OpApi\bin\Debug\net8.0\nlog.config +2024-07-08 15:05:25.8734 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-08 15:05:25.8856 Info Configuration initialized. diff --git a/ds-wms-service/DS.WMS.OpApi/Properties/PublishProfiles/FolderProfile.pubxml.user b/ds-wms-service/DS.WMS.OpApi/Properties/PublishProfiles/FolderProfile.pubxml.user new file mode 100644 index 00000000..fdf7c789 --- /dev/null +++ b/ds-wms-service/DS.WMS.OpApi/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -0,0 +1,12 @@ + + + + + <_PublishTargetUrl>D:\Code\PublishCopy\ds8-opapi + True|2024-07-08T06:33:12.6884426Z||;True|2024-07-08T09:56:58.4995696+08:00||; + + + \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Test/OpTest.cs b/ds-wms-service/DS.WMS.Test/OpTest.cs index fee883e7..4e4a939b 100644 --- a/ds-wms-service/DS.WMS.Test/OpTest.cs +++ b/ds-wms-service/DS.WMS.Test/OpTest.cs @@ -10,6 +10,7 @@ using DS.WMS.Core.Sys.Entity; using DS.WMS.Core.Sys.Interface; using Microsoft.AspNetCore.Mvc; using Microsoft.Extensions.DependencyInjection; +using Newtonsoft.Json; using NPOI.HPSF; using SharpCompress.Common; using SqlSugar; @@ -25,6 +26,7 @@ public class OpTest private readonly ISaasDbService saasService; private readonly IClientCommonService _formSetService; private readonly IOpCommonService _commonSetService; + //private readonly ICommonService _commonService; public OpTest(IServiceProvider serviceProvider) { _serviceProvider = serviceProvider; @@ -32,6 +34,7 @@ public class OpTest saasService = _serviceProvider.GetRequiredService(); _formSetService = _serviceProvider.GetRequiredService(); _commonSetService = _serviceProvider.GetRequiredService(); + //_commonService = _serviceProvider.GetRequiredService(); } [Fact] @@ -93,4 +96,5 @@ public class OpTest Assert.True(true); } + } \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Test/SaasTest.cs b/ds-wms-service/DS.WMS.Test/SaasTest.cs index ffdcafeb..fa6185a7 100644 --- a/ds-wms-service/DS.WMS.Test/SaasTest.cs +++ b/ds-wms-service/DS.WMS.Test/SaasTest.cs @@ -65,7 +65,7 @@ public class SaasTest { var tenantDb = saasService.GetBizDbScopeById("1750335377144680448"); StaticConfig.CodeFirst_MySqlCollate = "utf8mb4_0900_ai_ci";//较高版本支持 - tenantDb.CodeFirst.InitTables(typeof(SeaExportBillManage)); + tenantDb.CodeFirst.InitTables(typeof(SeaExportShippingBillTemplate)); //tenantDb.CodeFirst.InitTables(typeof(CheckBillAutoDetail)); //db.CodeFirst.InitTables(typeof(OpBusinessTruckCtn)); Assert.True(true); diff --git a/ds-wms-service/DS.WMS.Test/appsettings.json b/ds-wms-service/DS.WMS.Test/appsettings.json index 676d75ff..283bd822 100644 --- a/ds-wms-service/DS.WMS.Test/appsettings.json +++ b/ds-wms-service/DS.WMS.Test/appsettings.json @@ -1,51 +1,69 @@ { - "Logging": { - "LogLevel": { - "Default": "Information", - "Microsoft.AspNetCore": "Warning" - } - }, - "AllowedHosts": "*", - "JwtSettings": { - "Issuer": "vol.core.owner", - "Audience": "vol.core", - "User": "C5ABA9E202D94C43A3CA66002BF77FAF", - "SecretKey": "sdfsdfsrty45634kkhllghtdgdfss345t678fs" - }, - "Cors": { - "PolicyName": "WMSCore.API", - "Url": "http://localhost:8000,http://localhost:5999,http://localhost:8088,http://localhost:5173,http://0.0.0.0:5999,http://0.0.0.0:9995,http://localhost:9995,http://60.209.125.238:9995,http://localhost:3000,https://localhost:3100,http://47.104.255.182:3100,http://47.104.255.182:3110,https://localhost:3110,http://localhost:8080,http://localhost:8081,http://localhost:8082,http://localhost:8083,http://localhost:8084" - }, - "DBInfo": { - "DefaultDbConnId": "1288018625843826688", - "DefaultDbType": 0, - "DefaultDbString": "server=60.209.125.238;port=32006;uid=root;pwd=Djy@Mysql.test;database=shippingweb8_dev", - "DBS": [ - { - "ConnId": "1595354960864874496", - "DBType": 1, - "Enabled": false, - "HitRate": 40, - "Connection": "Data Source=47.105.193.36,11435;Initial Catalog=SHIPPINGWEB_JNHJ;Integrated Security=False;Connect Timeout=500;User ID=sa;Password=Ds20040201", - "ProviderName": "System.Data.SqlClient" - } - ] - }, - "SwaggerDoc": { - "ContactName": "WmsAdminAPI", - "ContactEmail": "Wms API.Core@xxx.com", - "ContactUrl": "https://www.xxx.com", - "Version": "1.0", - "Title": "Wms Admin API", - "Description": "Wms Admin API" - }, - "PrintService": { - "IP": "60.209.125.238", - "Port": "3009", - "AccessKey": "1777229107311022080", - "AccessSecret": "d816e6fe938f24e2f205db129d31286a", - "GetModuleListUrl": "/printApi/OpenPrint/GetPrintModuleList", - "GetTemplateListUrl": "/printApi/OpenPrint/GetPrintTemplateList", - "GetJsonPrintInfoUrl": "/printApi/OpenPrint/GetOpenJsonPrintInfo" + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" } + }, + "AllowedHosts": "*", + "JwtSettings": { + "Issuer": "vol.core.owner", + "Audience": "vol.core", + "User": "C5ABA9E202D94C43A3CA66002BF77FAF", + "SecretKey": "sdfsdfsrty45634kkhllghtdgdfss345t678fs" + }, + "Cors": { + "PolicyName": "WMSCore.API", + "Url": "http://localhost:8000,http://localhost:5999,http://localhost:8088,http://localhost:5173,http://0.0.0.0:5999,http://0.0.0.0:9995,http://localhost:9995,http://60.209.125.238:9995,http://localhost:3000,https://localhost:3100,http://47.104.255.182:3100,http://47.104.255.182:3110,https://localhost:3110,http://localhost:8080,http://localhost:8081,http://localhost:8082,http://localhost:8083,http://localhost:8084" + }, + "DBInfo": { + "DefaultDbConnId": "1288018625843826688", + "DefaultDbType": 0, + "DefaultDbString": "server=60.209.125.238;port=32006;uid=root;pwd=Djy@Mysql.test;database=shippingweb8_dev", + "DBS": [ + { + "ConnId": "1595354960864874496", + "DBType": 1, + "Enabled": false, + "HitRate": 40, + "Connection": "Data Source=47.105.193.36,11435;Initial Catalog=SHIPPINGWEB_JNHJ;Integrated Security=False;Connect Timeout=500;User ID=sa;Password=Ds20040201", + "ProviderName": "System.Data.SqlClient" + } + ] + }, + "SwaggerDoc": { + "ContactName": "WmsAdminAPI", + "ContactEmail": "Wms API.Core@xxx.com", + "ContactUrl": "https://www.xxx.com", + "Version": "1.0", + "Title": "Wms Admin API", + "Description": "Wms Admin API" + }, + "PrintService": { + "IP": "60.209.125.238", + "Port": "3009", + "AccessKey": "1777229107311022080", + "AccessSecret": "d816e6fe938f24e2f205db129d31286a", + "GetModuleListUrl": "/printApi/OpenPrint/GetPrintModuleList", + "GetTemplateListUrl": "/printApi/OpenPrint/GetPrintTemplateList", + "GetJsonPrintInfoUrl": "/printApi/OpenPrint/GetOpenJsonPrintInfo" + }, + "DjyService": { + "IP": "60.209.125.238", + "Port": "35100", + "AccessKey": "6b050e757c1e405489e19602dd81ebbe", + "AccessSecret": "51d564741c761e0760f62d904f13c193009e74d0af9f72e2dc67f9320b8ae42580e2339745aee1bf", + "SaveServiceProjectUrl": "/EmbedProjectGoodsStatus/SaveServiceProject", + "CancelServiceProjectUrl": "/EmbedProjectGoodsStatus/CancelServiceProject", + "GetServiceProjectListUrl": "/EmbedProjectGoodsStatus/GetServiceProjectList", + "GetServiceStatusListUrl": "/EmbedProjectGoodsStatus/GetServiceStatusList", + "SaveServiceStatusUrl": "/EmbedProjectGoodsStatus/SaveServiceStatus", + "CancelServiceStatusUrl": "/EmbedProjectGoodsStatus/CancelServiceStatus" + }, + "ExcuteRuleService": { + "IP": "47.104.73.97", + "Port": "7115", + "SenderKey": "SEFBZkh5V3R1TGxtdlBIcTF4QmNMWURCS08vb2EvTzVxS0F0eDFKdlgyS3lKVUx6K3JRRE94Q2kvcWZMRytZeWxyVkhLdk9hRGpzVStPamhIUXd5NU9FMjhFTktwUlZ2eThJZGlQd3p5dUk9", + "SendUrl": "/api/RulesEngineManage/ExcuteWorkFlow" + } } \ No newline at end of file