diff --git a/ds-wms-service/DS.WMS.ContainerManagementApi/Controllers/ApiController.cs b/ds-wms-service/DS.WMS.ContainerManagementApi/Controllers/ApiController.cs new file mode 100644 index 00000000..e50631a2 --- /dev/null +++ b/ds-wms-service/DS.WMS.ContainerManagementApi/Controllers/ApiController.cs @@ -0,0 +1,18 @@ +using Microsoft.AspNetCore.Authorization; +using Microsoft.AspNetCore.Mvc; + +namespace DS.WMS.ContainerManagementApi.Controllers; + +/// +/// WebApi控制器基类 +/// +[Authorize] +[ApiController] +[Route("containerManagementApi/[controller]")] +public abstract class ApiController : Controller +{ + // /// + // /// 获取用户信息 + // /// + // public UserInfo UserDetails => Request.GetUserInfo(); +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.ContainerManagementApi/Controllers/CM_CurrentStateController.cs b/ds-wms-service/DS.WMS.ContainerManagementApi/Controllers/CM_CurrentStateController.cs new file mode 100644 index 00000000..bf5678ea --- /dev/null +++ b/ds-wms-service/DS.WMS.ContainerManagementApi/Controllers/CM_CurrentStateController.cs @@ -0,0 +1,95 @@ +using DS.Module.Core; +using DS.Module.Core.Data; +using DS.WMS.ContainerManagement.Info.Dtos; +using DS.WMS.ContainerManagement.Info.Entity; +using DS.WMS.ContainerManagement.Info.Interface; +using DS.WMS.Core.Code.Dtos; +using DS.WMS.Core.Op.Dtos; +using DS.WMS.Core.Op.Interface; +using DS.WMS.Core.Op.View; +using Microsoft.AspNetCore.Mvc; + +namespace DS.WMS.ContainerManagementApi.Controllers; + +/// +/// 集装箱管理 +/// +public class CM_CurrentStateController : ApiController +{ + private readonly ICM_CurrentStateService _invokeService; + + /// + /// 构造函数 + /// + /// + public CM_CurrentStateController(ICM_CurrentStateService invokeService) + { + _invokeService = invokeService; + } + + /// + /// 列表 + /// + /// + /// + [HttpPost] + [Route("GetCM_CurrentStateList")] + public async Task>> GetCM_CurrentStateList([FromBody] PageRequest request) + { + var res = await _invokeService.GetListByPage(request); + return res; + } + + /// + /// 直接编辑状态 + /// + /// + [HttpPost] + [Route("EditCM_CurrentState")] + public DataResult EditCM_CurrentState([FromBody] CM_CurrentStateReq model) + { + var res = _invokeService.EditCM_CurrentState(model); + return res; + } + + + /// + /// 查看状态详情 + /// + /// + /// + [HttpGet] + [Route("GetCM_CurrentStateInfo")] + public DataResult GetCM_CurrentStateInfo([FromQuery] string id) + { + var res = _invokeService.GetCM_CurrentStateInfo(id); + return res; + } + + ///// + ///// 费用锁定 + ///// + ///// 主表Ids + ///// + //[HttpPost] + //[Route("FeeLocking")] + //public DataResult FeeLocking([FromBody] IdModel req) + //{ + // var res = _invokeService.FeeLocking(req); + // return res; + //} + + + ///// + ///// 费用解除锁定 + ///// + ///// 主表Ids + ///// + //[HttpPost] + //[Route("FeeUnLocking")] + //public DataResult FeeUnLocking([FromBody] IdModel req) + //{ + // var res = _invokeService.FeeUnLocking(req); + // return res; + //} +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.ContainerManagementApi/DS.WMS.ContainerManagementApi.csproj b/ds-wms-service/DS.WMS.ContainerManagementApi/DS.WMS.ContainerManagementApi.csproj new file mode 100644 index 00000000..9f6d401c --- /dev/null +++ b/ds-wms-service/DS.WMS.ContainerManagementApi/DS.WMS.ContainerManagementApi.csproj @@ -0,0 +1,24 @@ + + + + net8.0 + enable + enable + true + True + bin\Debug\net8.0\Api.xml + + + + + + + + + + + + + + + diff --git a/ds-wms-service/DS.WMS.ContainerManagementApi/DS.WMS.ContainerManagementApi.http b/ds-wms-service/DS.WMS.ContainerManagementApi/DS.WMS.ContainerManagementApi.http new file mode 100644 index 00000000..d2a062b9 --- /dev/null +++ b/ds-wms-service/DS.WMS.ContainerManagementApi/DS.WMS.ContainerManagementApi.http @@ -0,0 +1,6 @@ +@DS.WMS.ContainerManagementApi_HostAddress = http://localhost:5011 + +GET {{DS.WMS.ContainerManagementApi_HostAddress}}/weatherforecast/ +Accept: application/json + +### diff --git a/ds-wms-service/DS.WMS.ContainerManagementApi/Logs/internal-nlog.txt b/ds-wms-service/DS.WMS.ContainerManagementApi/Logs/internal-nlog.txt new file mode 100644 index 00000000..30eb1c52 --- /dev/null +++ b/ds-wms-service/DS.WMS.ContainerManagementApi/Logs/internal-nlog.txt @@ -0,0 +1,42 @@ +2024-07-25 15:40:36.9950 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-25 15:40:37.0123 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-25 15:40:37.0161 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-25 15:40:37.0333 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-25 15:40:37.0333 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\ds8-solution-pro\ds-wms-service\DS.WMS.ContainerManagementApi\bin\Debug\net8.0\nlog.config +2024-07-25 15:40:37.0333 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-25 15:40:37.0498 Info Configuration initialized. +2024-07-25 15:41:29.0953 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-25 15:41:29.1107 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-25 15:41:29.1107 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-25 15:41:29.1294 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-25 15:41:29.1294 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\ds8-solution-pro\ds-wms-service\DS.WMS.ContainerManagementApi\bin\Debug\net8.0\nlog.config +2024-07-25 15:41:29.1444 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-25 15:41:29.1444 Info Configuration initialized. +2024-07-25 16:17:59.0630 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-25 16:17:59.0872 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-25 16:17:59.0946 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-25 16:17:59.1151 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-25 16:17:59.1151 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\ds8-solution-pro\ds-wms-service\DS.WMS.ContainerManagementApi\bin\Debug\net8.0\nlog.config +2024-07-25 16:17:59.1292 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-25 16:17:59.1292 Info Configuration initialized. +2024-07-25 16:19:07.1595 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-25 16:19:07.1728 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-25 16:19:07.1728 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-25 16:19:07.1911 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-25 16:19:07.1911 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\ds8-solution-pro\ds-wms-service\DS.WMS.ContainerManagementApi\bin\Debug\net8.0\nlog.config +2024-07-25 16:19:07.1911 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-25 16:19:07.2052 Info Configuration initialized. +2024-07-25 16:24:33.7032 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-25 16:24:33.7032 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-25 16:24:33.7248 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-25 16:24:33.7460 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-25 16:24:33.7541 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\ds8-solution-pro\ds-wms-service\DS.WMS.ContainerManagementApi\bin\Debug\net8.0\nlog.config +2024-07-25 16:24:33.7541 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-25 16:24:33.7696 Info Configuration initialized. +2024-07-25 16:34:52.0017 Info Registered target NLog.Targets.FileTarget(Name=allfile) +2024-07-25 16:34:52.0017 Info Registered target NLog.Targets.FileTarget(Name=ownFile-web) +2024-07-25 16:34:52.0175 Info Registered target NLog.Targets.ColoredConsoleTarget(Name=console) +2024-07-25 16:34:52.0332 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-25 16:34:52.0332 Info Validating config: TargetNames=console, ownFile-web, ConfigItems=54, FilePath=D:\ds8-solution-pro\ds-wms-service\DS.WMS.ContainerManagementApi\bin\Debug\net8.0\nlog.config +2024-07-25 16:34:52.0332 Warn Unused target detected. Add a rule for this target to the configuration. TargetName: allfile +2024-07-25 16:34:52.0509 Info Configuration initialized. diff --git a/ds-wms-service/DS.WMS.ContainerManagementApi/Program.cs b/ds-wms-service/DS.WMS.ContainerManagementApi/Program.cs new file mode 100644 index 00000000..6bc37b0c --- /dev/null +++ b/ds-wms-service/DS.WMS.ContainerManagementApi/Program.cs @@ -0,0 +1,86 @@ +using Autofac; +using Autofac.Extensions.DependencyInjection; +using DS.Module.AutofacModule; +using DS.Module.Core; +using DS.Module.Core.Extensions; +using DS.Module.Core.ServiceExtensions; +using DS.Module.Jwt; +using DS.Module.MultiLanguage; +using DS.Module.SqlSugar; +using DS.Module.Swagger; +using DS.Module.UserModule; +using NLog.Web; +using Swashbuckle.AspNetCore.SwaggerUI; + +var builder = WebApplication.CreateBuilder(args); +var environment = builder.Environment.EnvironmentName; +Console.WriteLine("ǰ:" + environment); +//ע +builder.Configuration + // .SetBasePath(builder.Environment.ContentRootPath) + .AddJsonFile(path: "appsettings.json", optional: false, reloadOnChange: true) + // .AddJsonFile(path: $"appsettings.{environment}.json", optional: true, reloadOnChange: true) + .Build(); +builder.Configuration.AddEnvironmentVariables(); +builder.Logging.AddNLog("nlog.config"); +// Add services to the container. +//Autofacע +builder.Host + .UseServiceProviderFactory(new AutofacServiceProviderFactory()) + .ConfigureContainer(builder => { builder.RegisterModule(new AutofacModuleRegister()); }); + +builder.Services.AddAppWebInstal(); +builder.Services.AddCorsInstall(); +builder.Services.AddUserModuleInstall(); //û +builder.Services.AddSqlSugarInstall(); +builder.Services.AddSwaggerInstall(); +builder.Services.AddJwtInstall(); +builder.Services.AddSaasDbInstall();//ֿ +builder.Services.AddMultiLanguageInstall();//Է +// builder.Services.AddEndpointsApiExplorer(); +// builder.Services.AddSwaggerGen(); + +//builder.Services.AddCrawlerModuleInstall();//ٷ + +var app = builder.Build(); + +// Configure the HTTP request pipeline. +// if (app.Environment.IsDevelopment()) +// { +// app.UseSwagger(); +// app.UseSwaggerUI(); +// } +//swagger +// app.UseSwagger(); +var documentName = AppSetting.app(new string[] { "SwaggerDoc", "ContactName" }); +app + .UseSwagger(c => { c.RouteTemplate = "{documentName}/swagger.json"; }) + .UseSwaggerUI(c => + { + c.SwaggerEndpoint("/" + documentName + "/swagger.json", + AppSetting.app(new string[] { "SwaggerDoc", "ContactName" })); + c.DocExpansion(DocExpansion.None);//DocExpansionΪNone۵з + c.DefaultModelExpandDepth(-1);//-1 ɲʾModels + }); +// +var policyName = AppSetting.app(new string[] { "Cors", "PolicyName" }); +if (!policyName.IsNullOrEmpty()) +{ + app.UseCors(policyName); //ӿм +} + +app.UseRouting(); + +app.UseStaticFiles(); +//м +app.UseMiddleware(); +// //־м +// app.UseMiddleware(); + +// ȿ֤ +app.UseAuthentication(); +// ȻȨм +app.UseAuthorization(); +app.UseEndpoints(endpoints => { endpoints.MapControllers(); }); + +app.Run(); \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.ContainerManagementApi/Properties/launchSettings.json b/ds-wms-service/DS.WMS.ContainerManagementApi/Properties/launchSettings.json new file mode 100644 index 00000000..153510ec --- /dev/null +++ b/ds-wms-service/DS.WMS.ContainerManagementApi/Properties/launchSettings.json @@ -0,0 +1,41 @@ +{ + "$schema": "http://json.schemastore.org/launchsettings.json", + "iisSettings": { + "windowsAuthentication": false, + "anonymousAuthentication": true, + "iisExpress": { + "applicationUrl": "http://localhost:52580", + "sslPort": 44370 + } + }, + "profiles": { + "http": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "http://localhost:5011", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "https": { + "commandName": "Project", + "dotnetRunMessages": true, + "launchBrowser": true, + "launchUrl": "swagger", + "applicationUrl": "https://localhost:7026;http://localhost:5011", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + }, + "IIS Express": { + "commandName": "IISExpress", + "launchBrowser": true, + "launchUrl": "swagger", + "environmentVariables": { + "ASPNETCORE_ENVIRONMENT": "Development" + } + } + } +} diff --git a/ds-wms-service/DS.WMS.ContainerManagementApi/appsettings.Development.json b/ds-wms-service/DS.WMS.ContainerManagementApi/appsettings.Development.json new file mode 100644 index 00000000..0c208ae9 --- /dev/null +++ b/ds-wms-service/DS.WMS.ContainerManagementApi/appsettings.Development.json @@ -0,0 +1,8 @@ +{ + "Logging": { + "LogLevel": { + "Default": "Information", + "Microsoft.AspNetCore": "Warning" + } + } +} diff --git a/ds-wms-service/DS.WMS.ContainerManagementApi/appsettings.json b/ds-wms-service/DS.WMS.ContainerManagementApi/appsettings.json new file mode 100644 index 00000000..a97587c4 --- /dev/null +++ b/ds-wms-service/DS.WMS.ContainerManagementApi/appsettings.json @@ -0,0 +1,89 @@ +{ + "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": "1288018625843826680", + "DBType": 0, + "Enabled": false, + "HitRate": 40, + "Connection": "server=60.209.125.238;port=32006;uid=root;pwd=Djy@Mysql.test;database=shippingweb8_log" + } + ] + }, + "SwaggerDoc": { + "ContactName": "WmsContainerManagementAPI", + "ContactEmail": "Wms API.Core@xxx.com", + "ContactUrl": "https://www.xxx.com", + "Version": "1.0", + "Title": "Wms ContainerManagement API", + "Description": "Wms ContainerManagement API" + }, + "Middleware": { + "RecordAccessLogs": { + "Enabled": true, + "IgnoreApis": "/api/permission/getnavigationbar,/api/monitor/getids4users,/api/monitor/getaccesslogs,/api/monitor/server,/api/monitor/getactiveusers,/api/monitor/server," + } + }, + "FileSettings": { + "BasePath": "", //基础路径,不配置则使用当前系统目录 + "RelativePath": "LinkAttach", + "FileType": [ ".xls", ".xlsx", ".pdf", ".jpg", ".png", ".txt", ".pms" ] + }, + //打印模板 + "PrintTemplate": { + "BasePath": "", //基础路径,不配置则使用当前系统目录 + "RelativePath": "Upload/PrintTemplate", + "FileType": [ ".frx", ".xls" ] + }, + "TempFile": { + "Path": "TempFiles", + "RemainHours": 2 + }, + "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" + } +} diff --git a/ds-wms-service/DS.WMS.ContainerManagementApi/nlog.config b/ds-wms-service/DS.WMS.ContainerManagementApi/nlog.config new file mode 100644 index 00000000..46e6f7cb --- /dev/null +++ b/ds-wms-service/DS.WMS.ContainerManagementApi/nlog.config @@ -0,0 +1,36 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_CurrentStateReq.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_CurrentStateReq.cs new file mode 100644 index 00000000..72d3027c --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_CurrentStateReq.cs @@ -0,0 +1,136 @@ +using DS.Module.Core; +using FluentValidation; +using SqlSugar; + +namespace DS.WMS.ContainerManagement.Info.Dtos; + +/// +/// 集装箱当前状态 请求实体 +/// +public class CM_CurrentStateReq +{ + /// + /// 主键Id + /// + public long Id { get; set; } + /// + /// 集装箱号 + /// + public string Cntrno { get; set; } + + // + /// Desc:箱型 + /// + public string Ctnall { get; set; } + + /// + /// Desc:是否上线(是否管理中) + /// + public bool IsOnline { get; set; } = false; + + /// + /// Desc:新旧箱 空白/used/new + /// + public string UsedState { get; set; } + + /// + /// Desc:箱主 + /// + public string CtnOwner { get; set; } + + + /// + /// Desc:业务所属分部 + /// + public string Corpid { get; set; } + + /// + /// Desc:箱来源: 自有箱/短租租入/长租租入/买箱 + /// + public string CtnSource { get; set; } + + /// + /// Desc:箱业务状态: 短租租出 长租租出 单程 卖箱 + /// + public string CtnBizState { get; set; } = "0"; + + /// + /// Desc:箱业务编号:当前 + /// + public string Billno { get; set; } + + /// + /// Desc:关联放箱单号 + /// + public string CtnReleaseNo { get; set; } + + /// + /// Desc:箱状态 + /// + public string CtnState { get; set; } + + /// + /// Desc:箱损坏/维修状态 + /// + public string CtnBreakState { get; set; } + + /// + /// Desc:当前港口 + /// + public string Portid { get; set; } + + /// + /// Desc:码头或场站 + /// + public string Depot { get; set; } + + /// + /// Desc:运输工具 + /// + public string VehicleName { get; set; } + + /// + /// Desc:当前业务编号 + /// + public string Mblno { get; set; } + + + /// + /// Desc:业务委托单位 + /// + public string CustomerName { get; set; } + + + /// + /// Desc:ETD + /// + public DateTime? ETD { get; set; } + + /// + /// Desc:ETD + /// + public DateTime? ETA { get; set; } + + + /// + /// Desc:状态时间 + /// + public DateTime? StateTime { get; set; } +} + +/// +/// 验证 +/// +public class CM_CurrentStateReqValidator : AbstractValidator +{ + /// + /// 构造函数 + /// + public CM_CurrentStateReqValidator() + { + this.RuleFor(o => o.Cntrno) + .NotEmpty().WithName("集装箱号"); + this.RuleFor(o => o.Ctnall) + .NotEmpty().WithName("箱型"); + } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_CurrentStateRes.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_CurrentStateRes.cs new file mode 100644 index 00000000..dc1f13e3 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Dtos/CM_CurrentStateRes.cs @@ -0,0 +1,117 @@ +using DS.Module.Core; +using SqlSugar; + +namespace DS.WMS.ContainerManagement.Info.Dtos; + +/// +/// 集装箱当前状态 返回实体 +/// +public class CM_CurrentStateRes +{ + /// + /// 主键Id + /// + public long Id { get; set; } + /// + /// 集装箱号 + /// + public string Cntrno { get; set; } + + // + /// Desc:箱型 + /// + public string Ctnall { get; set; } + + /// + /// Desc:是否上线(是否管理中) + /// + public bool IsOnline { get; set; } = false; + + /// + /// Desc:新旧箱 空白/used/new + /// + public string UsedState { get; set; } + + /// + /// Desc:箱主 + /// + public string CtnOwner { get; set; } + + /// + /// Desc:业务所属分部 + /// + public string Corpid { get; set; } + + /// + /// Desc:箱来源: 自有箱/短租租入/长租租入/买箱 + /// + public string CtnSource { get; set; } + + /// + /// Desc:箱业务状态: 短租租出 长租租出 单程 卖箱 + /// + public string CtnBizState { get; set; } = "0"; + + /// + /// Desc:箱业务编号:当前 + /// + public string Billno { get; set; } + + /// + /// Desc:关联放箱单号 + /// + public string CtnReleaseNo { get; set; } + + /// + /// Desc:箱状态 + /// + public string CtnState { get; set; } + + /// + /// Desc:箱损坏/维修状态 + /// + public string CtnBreakState { get; set; } + + /// + /// Desc:当前港口 + /// + public string Portid { get; set; } + + /// + /// Desc:码头或场站 + /// + public string Depot { get; set; } + + /// + /// Desc:运输工具 + /// + public string VehicleName { get; set; } + + /// + /// Desc:当前业务编号 + /// + public string Mblno { get; set; } + + + /// + /// Desc:业务委托单位 + /// + public string CustomerName { get; set; } + + + /// + /// Desc:ETD + /// + public DateTime? ETD { get; set; } + + /// + /// Desc:ETD + /// + public DateTime? ETA { get; set; } + + + /// + /// Desc:状态时间 + /// + public DateTime? StateTime { get; set; } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_CurrentState.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_CurrentState.cs new file mode 100644 index 00000000..8dacc9cc --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Entity/CM_CurrentState.cs @@ -0,0 +1,136 @@ +using DS.Module.Core; +using DS.Module.Core.Data; +using SqlSugar; + +namespace DS.WMS.ContainerManagement.Info.Entity; + +/// +/// 集装箱当前状态 +/// +[SqlSugar.SugarTable("CM_CurrentState", "箱管_当前状态")] +public class CM_CurrentState : BaseOrgModel +{ + /// + /// Desc:集装箱号 + /// + [SugarColumn(ColumnDescription = "集装箱号", IsNullable = false, Length = 20)] + public string Cntrno { get; set; } + + /// + /// Desc:箱型 + /// + [SugarColumn(ColumnDescription = "箱型", IsNullable = false, Length = 20)] + public string Ctnall { get; set; } + + /// + /// Desc:是否上线(是否管理中) + /// + [SugarColumn(ColumnDescription = "是否上线", IsNullable = false,DefaultValue ="0")] + public bool IsOnline { get; set; } = false; + + /// + /// Desc:新旧箱 空白/used/new + /// + [SugarColumn(ColumnDescription = "新旧箱", IsNullable = true, Length = 20)] + public string UsedState { get; set; } + + /// + /// Desc:箱主 + /// + [SugarColumn(ColumnDescription = "箱主", IsNullable = true, Length = 50)] + public string CtnOwner { get; set; } + + /// + /// Desc:业务所属分部 + /// + [SugarColumn(ColumnDescription = "业务所属分部", IsNullable = true, Length = 50)] + public string Corpid { get; set; } + + /// + /// Desc:箱来源: 自有箱/短租租入/长租租入/买箱 + /// + [SugarColumn(ColumnDescription = "箱来源", IsNullable = true, Length = 20)] + public string CtnSource { get; set; } + + /// + /// Desc:箱业务状态: 短租租出 长租租出 单程 卖箱 + /// + [SugarColumn(ColumnDescription = "箱业务状态", DefaultValue = "")] + public string CtnBizState { get; set; } = "0"; + + /// + /// Desc:箱业务编号:当前 + /// + [SugarColumn(ColumnDescription = "箱业务编号", IsNullable = true, Length = 50)] + public string Billno { get; set; } + + /// + /// Desc:关联放箱单号 + /// + [SugarColumn(ColumnDescription = "关联放箱单号", Length = 50)] + public string CtnReleaseNo { get; set; } + + /// + /// Desc:箱状态 + /// + [SugarColumn(ColumnDescription = "箱状态", IsNullable = true, Length = 20)] + public string CtnState { get; set; } + + /// + /// Desc:箱损坏/维修状态 + /// + [SugarColumn(ColumnDescription = "箱损坏/维修状态", IsNullable = true, Length = 20)] + public string CtnBreakState { get; set; } + + /// + /// Desc:当前港口 + /// + [SugarColumn(ColumnDescription = "当前港口", IsNullable = true, Length = 50)] + public string Portid { get; set; } + + /// + /// Desc:码头或场站 + /// + [SugarColumn(ColumnDescription = "码头或场站", IsNullable = true, Length = 50)] + public string Depot { get; set; } + + /// + /// Desc:运输工具 + /// + [SugarColumn(ColumnDescription = "运输工具", IsNullable = true, Length = 50)] + public string VehicleName { get; set; } + + /// + /// Desc:当前业务编号 + /// + [SugarColumn(ColumnDescription = "当前业务编号", IsNullable = true, Length = 50)] + public string Mblno { get; set; } + + + /// + /// Desc:业务委托单位 + /// + [SugarColumn(ColumnDescription = "业务委托单位", IsNullable = true, Length = 50)] + public string CustomerName { get; set; } + + + /// + /// Desc:ETD + /// + [SugarColumn(ColumnDescription = "ETD", IsNullable = true)] + public DateTime? ETD { get; set; } + + /// + /// Desc:ETD + /// + [SugarColumn(ColumnDescription = "ETA", IsNullable = true)] + public DateTime? ETA { get; set; } + + + /// + /// Desc:状态时间 + /// + [SugarColumn(ColumnDescription = "状态时间", IsNullable = true)] + public DateTime? StateTime { get; set; } + +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Interface/ICM_CurrentStateService.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Interface/ICM_CurrentStateService.cs new file mode 100644 index 00000000..73562116 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Interface/ICM_CurrentStateService.cs @@ -0,0 +1,33 @@ +using DS.Module.Core; +using DS.WMS.ContainerManagement.Info.Dtos; +using DS.WMS.Core.Info.Dtos; +using DS.WMS.Core.Op.View; +using DS.WMS.Core.Sys.Dtos; + +namespace DS.WMS.ContainerManagement.Info.Interface; + +public interface ICM_CurrentStateService +{ + /// + /// 列表 + /// + /// + /// + //DataResult> GetListByPage(PageRequest request); + public Task>> GetListByPage(PageRequest request); + + + /// + /// 编辑 + /// + /// + /// + DataResult EditCM_CurrentState(CM_CurrentStateReq model); + + /// + /// 获取详情 + /// + /// + /// + DataResult GetCM_CurrentStateInfo(string id); +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Core/ContainerManagement/Method/ClientAccountDateService.cs b/ds-wms-service/DS.WMS.Core/ContainerManagement/Method/ClientAccountDateService.cs new file mode 100644 index 00000000..3bc46a14 --- /dev/null +++ b/ds-wms-service/DS.WMS.Core/ContainerManagement/Method/ClientAccountDateService.cs @@ -0,0 +1,115 @@ +using DS.Module.Core; +using DS.Module.Core.Extensions; +using DS.Module.SqlSugar; +using DS.Module.UserModule; +using DS.WMS.ContainerManagement.Info.Dtos; +using DS.WMS.ContainerManagement.Info.Entity; +using DS.WMS.ContainerManagement.Info.Interface; +using DS.WMS.Core.Info.Dtos; +using DS.WMS.Core.Info.Entity; +using DS.WMS.Core.Info.Interface; +using DS.WMS.Core.Op.View; +using DS.WMS.Core.Sys.Entity; +using Mapster; +using Microsoft.Extensions.DependencyInjection; +using SqlSugar; + +namespace DS.WMS.ContainerManagement.Info.Method; + +public class CM_CurrentStateService : ICM_CurrentStateService +{ + private readonly IServiceProvider _serviceProvider; + private readonly ISqlSugarClient db; + private readonly IUser user; + private readonly ISaasDbService saasService; + + /// + /// + /// + /// + public CM_CurrentStateService(IServiceProvider serviceProvider) + { + _serviceProvider = serviceProvider; + db = _serviceProvider.GetRequiredService(); + user = _serviceProvider.GetRequiredService(); + saasService = _serviceProvider.GetRequiredService(); + } + + /// + /// 列表 + /// + /// + /// + public async Task>> GetListByPage(PageRequest request) + { + var tenantDb = saasService.GetBizDbScopeById(user.TenantId); + //序列化查询条件 + var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition); + var data = tenantDb.Queryable() + .Where(whereList) + .Select().ToQueryPage(request.PageCondition); + return data; + } + //public async Task>> GetListByPage(PageRequest request) + //{ + // var tenantDb = saasService.GetBizDbScopeById(user.TenantId); + // //序列化查询条件 + // var whereList = db.ConfigQuery.Context.Utilities.JsonToConditionalModels(request.QueryCondition); + // var data = await tenantDb.Queryable() + // .Where(whereList) + // .ToQueryPageAsync(request.PageCondition); + // return data; + //} + + + /// + /// 编辑 + /// + /// + /// + public DataResult EditCM_CurrentState(CM_CurrentStateReq req) + { + var tenantDb = saasService.GetBizDbScopeById(user.TenantId); + if (req.Id == 0) + { + //if (tenantDb.Queryable().Where(x => x.AccountType == req.AccountType && + // x.AccountType == req.AccountType && + // x.SaleId == req.SaleId && + // x.BeginDate == req.BeginDate && + // x.EndDate == req.EndDate).Any()) + //{ + // return DataResult.Failed("客户账期信息已存在!", MultiLanguageConst.ClientAccountDateExist); + //} + + var data = req.Adapt(); + + var entity = tenantDb.Insertable(data).ExecuteReturnEntity(); + + return DataResult.Successed("添加成功!", entity.Id, MultiLanguageConst.DataCreateSuccess); + } + else + { + var info = tenantDb.Queryable().Where(x => x.Id == req.Id).First(); + + info = req.Adapt(info); + + tenantDb.Updateable(info).IgnoreColumns(ignoreAllNullColumns: true).ExecuteCommand(); + return DataResult.Successed("更新成功!", MultiLanguageConst.DataUpdateSuccess); + } + } + + /// + /// 详情 + /// + /// + /// + public DataResult GetCM_CurrentStateInfo(string id) + { + var tenantDb = saasService.GetBizDbScopeById(user.TenantId); + var data = tenantDb.Queryable() + .Where(a => a.Id == long.Parse(id)) + .Select() + .First(); + return DataResult.Success(data, MultiLanguageConst.DataQuerySuccess); + } +} \ No newline at end of file diff --git a/ds-wms-service/DS.WMS.Gateway/ocelot.json b/ds-wms-service/DS.WMS.Gateway/ocelot.json index 49d632c6..5eb6ac5c 100644 --- a/ds-wms-service/DS.WMS.Gateway/ocelot.json +++ b/ds-wms-service/DS.WMS.Gateway/ocelot.json @@ -199,6 +199,24 @@ "Type": "RoundRobin" } }, + { + "DownstreamPathTemplate": "/containerManagementApi/{url}", + "DownstreamScheme": "http", + "DownstreamHostAndPorts": [ + { + "Host": "localhost", + "Port": 3005 + } + ], + "UpstreamPathTemplate": "/containerManagementApi/{url}", + "UpstreamHttpMethod": [ + "Get", + "Post" + ], + "LoadBalancerOptions": { + "Type": "RoundRobin" + } + }, { "DownstreamPathTemplate": "/LinkAttach/{url}", "DownstreamScheme": "http", diff --git a/ds-wms-service/DS.WMS.Test/ContainerManagementTest.cs b/ds-wms-service/DS.WMS.Test/ContainerManagementTest.cs new file mode 100644 index 00000000..8a5fe6db --- /dev/null +++ b/ds-wms-service/DS.WMS.Test/ContainerManagementTest.cs @@ -0,0 +1,258 @@ +using System.Reflection; +using DS.Module.Core; +using DS.Module.Core.Extensions; +using DS.Module.SqlSugar; +using DS.WMS.ContainerManagement.Info.Entity; +using DS.WMS.Core.Check.Entity; +using DS.WMS.Core.Code.Entity; +using DS.WMS.Core.Info.Entity; +using DS.WMS.Core.Op.Entity; +using DS.WMS.Core.Op.Entity.BookingSlot; +using DS.WMS.Core.Sys.Entity; +using DS.WMS.Core.TaskPlat.Entity; +using Mapster; +using Masuit.Tools.Strings; +using Microsoft.Extensions.DependencyInjection; +using Microsoft.Owin.BuilderProperties; +using Newtonsoft.Json; +using Newtonsoft.Json.Serialization; +using Org.BouncyCastle.Ocsp; +using SqlSugar; +using SqlSugar.IOC; +using Xunit; + +namespace Ds.WMS.Test; + +public class ContainerManagementTest +{ + private readonly IServiceProvider _serviceProvider; + private readonly SqlSugarScope db; + private readonly ISaasDbService saasService; + public ContainerManagementTest(IServiceProvider serviceProvider) + { + _serviceProvider = serviceProvider; + db = (SqlSugarScope)_serviceProvider.GetRequiredService(); + saasService = _serviceProvider.GetRequiredService(); + } + + [Fact] + public void ContainerManagementTest1() + { + Type[] types = Assembly + .LoadFrom("DS.WMS.Core.dll")//如果 .dll报错,可以换成 xxx.exe 有些生成的是exe + .GetTypes().Where(it => it.FullName.Contains("DS.WMS.Core.Op.Entity.")) + //.GetTypes().Where(it => it.FullName.Contains("DS.WMS.Core.Code.Entity.") || it.FullName.Contains("DS.WMS.Core.Info.Entity.") || it.FullName.Contains("DS.WMS.Core.Flow.Entity.") + //|| it.FullName.Contains("DS.WMS.Core.Check.Entity.") || it.FullName.Contains("DS.WMS.Core.Map.Entity."))//命名空间过滤,当然你也可以写其他条件过滤 + .ToArray(); + //Type[] types = Assembly + // .LoadFrom("DS.WMS.Core.dll")//如果 .dll报错,可以换成 xxx.exe 有些生成的是exe + // .GetTypes().Where(it => it.FullName.Contains("DS.WMS.Core.Code.Entity."))//命名空间过滤,当然你也可以写其他条件过滤 + // .ToArray(); + var tenantDb = saasService.GetBizDbScopeById("1750335377144680448"); + // var temp = tenantDb.CodeFirst.GetDifferenceTables(types); || it.FullName.Contains("DS.WMS.Core.Op.Entity.") + // var diffString= tenantDb.CodeFirst.GetDifferenceTables(types).ToDiffString(); + StaticConfig.CodeFirst_MySqlCollate = "utf8mb4_0900_ai_ci";//较高版本支持 + //types = types.Where(it => it.Name != "BusinessFeeStatus").ToArray(); + //types = types.Where(it => it.Name != "BusinessOrderContact").ToArray(); + + tenantDb.CodeFirst.InitTables(types); + // //初始化数库 + // tenantDb.DbMaintenance.CreateDatabase(); + // + // tenantDb.CodeFirst.InitTables(typeof(CodeCountry)); + Assert.True(true); + } + + + /// + /// 主库初始化单表 + /// + //[Fact] + //public void MasterInitTableTest() + //{ + // StaticConfig.CodeFirst_MySqlCollate = "utf8mb4_0900_ai_ci";//较高版本支持 + // db.CodeFirst.InitTables(typeof(SysPrintTemplate)); + // //tenantDb.CodeFirst.InitTables(typeof(CheckBillAutoDetail)); + // //db.CodeFirst.InitTables(typeof(OpBusinessTruckCtn)); + // Assert.True(true); + //} + /// + /// 初始化单表 + /// + [Fact] + public void InitTableTest() + { + var tenantDb = saasService.GetBizDbScopeById("1750335377144680448"); + StaticConfig.CodeFirst_MySqlCollate = "utf8mb4_0900_ai_ci";//较高版本支持 + + + tenantDb.CodeFirst.InitTables(typeof(CM_CurrentState)); + //tenantDb.CodeFirst.InitTables(typeof(BookingStatusLog)); + //tenantDb.CodeFirst.InitTables(typeof(BookingStatus)); + //tenantDb.CodeFirst.InitTables(typeof(BookingStatusLogDetail)); + //tenantDb.CodeFirst.InitTables(typeof(BusinessOrderContact)); + //tenantDb.CodeFirst.InitTables(typeof(BusinessTruck)); + //tenantDb.CodeFirst.InitTables(typeof(BusinessTruckCtn)); + //tenantDb.CodeFirst.InitTables(typeof(BusinessYard)); + ////tenantDb.CodeFirst.InitTables(typeof(OpCtn)); + //tenantDb.CodeFirst.InitTables(typeof(OpCtnDetail)); + //tenantDb.CodeFirst.InitTables(typeof(OpFile)); + ////tenantDb.CodeFirst.InitTables(typeof(SeaExport)); + //tenantDb.CodeFirst.InitTables(typeof(SeaExportBillManage)); + //tenantDb.CodeFirst.InitTables(typeof(SeaExportBillManageCtn)); + //tenantDb.CodeFirst.InitTables(typeof(SeaExportEdi)); + //tenantDb.CodeFirst.InitTables(typeof(SeaExportRemark)); + //tenantDb.CodeFirst.InitTables(typeof(SeaExportShippingBill)); + //tenantDb.CodeFirst.InitTables(typeof(SeaExportShippingBillCtn)); + //tenantDb.CodeFirst.InitTables(typeof(SeaExportShippingBillPartCtn)); + //tenantDb.CodeFirst.InitTables(typeof(SeaExportShippingBillTemplate)); + //db.CodeFirst.InitTables(typeof(OpBusinessTruckCtn)); + Assert.True(true); + } + + ///// + ///// 初始化海运出口视图 + ///// + //[Fact] + //public void InitSeaExportViewTest() + //{ + // var tenantDb = saasService.GetBizDbScopeById("1750335377144680448"); + // StaticConfig.CodeFirst_MySqlCollate = "utf8mb4_0900_ai_ci";//较高版本支持 + // tenantDb.CodeFirst.InitTables(typeof(SeaExport)); + // Assert.True(true); + //} + [Fact] + public void SaasCheckTest() + { + Type[] types = Assembly + .LoadFrom("DS.WMS.Core.dll")//如果 .dll报错,可以换成 xxx.exe 有些生成的是exe + .GetTypes().Where(it => it.FullName.Contains("DS.WMS.Core.Code.Entity"))//命名空间过滤,当然你也可以写其他条件过滤 + .ToArray(); + var tenantDb = saasService.GetBizDbScopeById("1750335377144680448"); + StaticConfig.CodeFirst_MySqlCollate = "utf8mb4_0900_ai_ci";//较高版本支持 + tenantDb.CodeFirst.InitTables(types); + Assert.True(true); + } + [Fact] + public void SaasFeeTest() + { + Type[] types = Assembly + .LoadFrom("DS.WMS.Core.dll")//如果 .dll报错,可以换成 xxx.exe 有些生成的是exe + .GetTypes().Where(it => it.FullName.Contains("DS.WMS.Core.Fee.Entity"))//命名空间过滤,当然你也可以写其他条件过滤 + .ToArray(); + var tenantDb = saasService.GetBizDbScopeById("1750335377144680448"); + StaticConfig.CodeFirst_MySqlCollate = "utf8mb4_0900_ai_ci";//较高版本支持 + tenantDb.CodeFirst.InitTables(types); + Assert.True(true); + } + [Fact] + + public void ClientBatchEdit() + { + var tenantDb = saasService.GetBizDbScopeById("1750335377144680448"); + + var info = tenantDb.Queryable().Filter(null, true).Where(x => x.Id == 1772138307266940928).First(); + + var temp = new ClientTemp + { + Address = "4", + Name = "4", + }; + var dic = temp.GetPropertiesArray(); + + info = temp.Adapt(info); + tenantDb.Updateable(info).UpdateColumns(dic).ExecuteCommand(); + + + Assert.True(true); + } + [Fact] + + public void CopyColumnTest() + { + var tenantDb = saasService.GetBizDbScopeById("1750335377144680448"); + + var columns = "noBill,enName,copyNoBill"; + + + var list = columns.Split(","); + var list1 = new List(); + foreach (var item in list) + { + list1.Add(item.ToUpperCamelCase()); + } + Console.WriteLine(list1[0]); + Assert.True(true); + } + + + public class ClientTemp + { + /// + /// Desc:客户中文名称或描述信息 + /// + public string Description { get; set; } + + /// + /// Desc:客户英文简称 + /// + public string Name { get; set; } + + /// + /// Desc:客户英文全称 + /// + public string EnFullName { get; set; } + + /// + /// Desc:通讯地址 + /// + public string Address { get; set; } + } + + /// + /// 初始化单表 + /// + [Fact] + public void InitTableTestJHQ() + { + var tenantDb = saasService.GetBizDbScopeById("1750335377144680448"); + StaticConfig.CodeFirst_MySqlCollate = "utf8mb4_0900_ai_ci";//较高版本支持 + //tenantDb.CodeFirst.InitTables(typeof(SpaceBookingOrder)); + //tenantDb.CodeFirst.InitTables(typeof(SpaceBookingOrderCtn)); + //tenantDb.CodeFirst.InitTables(typeof(SpaceBookingOrderShipSchedule)); + //tenantDb.CodeFirst.InitTables(typeof(BookingSlotBase)); + //tenantDb.CodeFirst.InitTables(typeof(BookingSlotCtn)); + //tenantDb.CodeFirst.InitTables(typeof(BookingSlotStock)); + //tenantDb.CodeFirst.InitTables(typeof(BookingSlotAllocation)); + //tenantDb.CodeFirst.InitTables(typeof(BookingSlotAllocationCtn)); + //tenantDb.CodeFirst.InitTables(typeof(BookingSlotDemand)); + //tenantDb.CodeFirst.InitTables(typeof(BookingSlotDemandCtn)); + //tenantDb.CodeFirst.InitTables(typeof(BookingSlotCompare)); + //tenantDb.CodeFirst.InitTables(typeof(BookingContractNoManage)); + //tenantDb.CodeFirst.InitTables(typeof(BookingLabel)); + //tenantDb.CodeFirst.InitTables(typeof(BookingLabelAllocation)); + + tenantDb.CodeFirst.InitTables(typeof(InfoClient)); + //tenantDb.CodeFirst.InitTables(typeof(CodeThirdParty)); + //tenantDb.CodeFirst.InitTables(typeof(CheckBillAutoDetail)); + //db.CodeFirst.InitTables(typeof(OpBusinessTruckCtn)); + Assert.True(true); + } + /// + /// 初始化单表 + /// + [Fact] + public void InitTableTestZXF() + { + var tenantDb = saasService.GetBizDbScopeById("1750335377144680448"); + StaticConfig.CodeFirst_MySqlCollate = "utf8mb4_0900_ai_ci";//较高版本支持 + + var ass = Assembly.Load("DS.WMS.Core"); + var types = ass.GetTypes().Where(it => it.FullName?.Contains("DS.WMS.Core.TaskPlat.Entity") == true).ToArray(); + tenantDb.CodeFirst.InitTables(types); + + //tenantDb.CodeFirst.InitTables(typeof(TaskFlowLog)); + //tenantDb.CodeFirst.InitTables(typeof(TaskFlowLogDetail)); + Assert.True(true); + } +} \ No newline at end of file diff --git a/ds-wms-service/ds-wms-service.sln b/ds-wms-service/ds-wms-service.sln index 7994ebf3..22e9738c 100644 --- a/ds-wms-service/ds-wms-service.sln +++ b/ds-wms-service/ds-wms-service.sln @@ -67,6 +67,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "DS.WMS.PrintApi", "DS.WMS.P EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DS.Module.OcrModule", "DS.Module.OcrModule\DS.Module.OcrModule.csproj", "{3EB9CA1E-5910-42A5-A64D-0CB435F6A64A}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "DS.WMS.ContainerManagementApi", "DS.WMS.ContainerManagementApi\DS.WMS.ContainerManagementApi.csproj", "{7C3E248A-DF40-46AC-A8DF-224DD7C4EEF7}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -189,6 +191,10 @@ Global {3EB9CA1E-5910-42A5-A64D-0CB435F6A64A}.Debug|Any CPU.Build.0 = Debug|Any CPU {3EB9CA1E-5910-42A5-A64D-0CB435F6A64A}.Release|Any CPU.ActiveCfg = Release|Any CPU {3EB9CA1E-5910-42A5-A64D-0CB435F6A64A}.Release|Any CPU.Build.0 = Release|Any CPU + {7C3E248A-DF40-46AC-A8DF-224DD7C4EEF7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {7C3E248A-DF40-46AC-A8DF-224DD7C4EEF7}.Debug|Any CPU.Build.0 = Debug|Any CPU + {7C3E248A-DF40-46AC-A8DF-224DD7C4EEF7}.Release|Any CPU.ActiveCfg = Release|Any CPU + {7C3E248A-DF40-46AC-A8DF-224DD7C4EEF7}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE @@ -223,6 +229,7 @@ Global {4B51DCC1-62A5-49C5-978B-798E6B48F3C0} = {518DB9B5-80A8-4B2C-8570-52BD406458DE} {274B1D18-A15A-4917-A567-6FDCD090D5B0} = {65D75DB2-12D5-4D1F-893D-9750905CE5E4} {3EB9CA1E-5910-42A5-A64D-0CB435F6A64A} = {518DB9B5-80A8-4B2C-8570-52BD406458DE} + {7C3E248A-DF40-46AC-A8DF-224DD7C4EEF7} = {65D75DB2-12D5-4D1F-893D-9750905CE5E4} EndGlobalSection GlobalSection(ExtensibilityGlobals) = postSolution SolutionGuid = {66115F23-94B4-43C0-838E-33B5CF77F788}