Merge branch 'dev' of http://60.209.125.238:20010/chenjingyong/ds8-solution-pro into dev
commit
ef6176e897
@ -0,0 +1,50 @@
|
||||
using DS.Module.Core;
|
||||
using DS.Module.Core.Data;
|
||||
using SqlSugar;
|
||||
|
||||
namespace DS.WMS.ContainerManagement.Info.Entity;
|
||||
|
||||
/// <summary>
|
||||
/// 箱管_月结账单
|
||||
/// </summary>
|
||||
[SqlSugar.SugarTable("CM_ustFeeDui", "箱管_月结账单")]
|
||||
public class CM_ustFeeDui : BaseOrgModel<long>
|
||||
{
|
||||
/// <summary>
|
||||
/// Desc:月结账单编号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "月结账单编号", IsNullable = false, Length = 20)]
|
||||
public string Billno { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// 结算对象Id
|
||||
/// </summary>
|
||||
[SqlSugar.SugarColumn(ColumnDescription = "结算对象Id", IsNullable = false, DefaultValue = "0")]
|
||||
public long CustomerId { get; set; }
|
||||
/// <summary>
|
||||
/// 结算对象 t_info_client CUSTNAME
|
||||
/// </summary>
|
||||
[SqlSugar.SugarColumn(ColumnDescription = "结算对象", IsNullable = true, Length = 50)]
|
||||
public string CustomerName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:租箱类型 1长租 0短租 2单程 CMRentTypeEnum
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "租箱类型", IsNullable = true, Length = 20, DefaultValue = "2")]
|
||||
public string RentType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:业务状态
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "业务状态", IsNullable = true, Length = 20)]
|
||||
public string BillState { get; set; }
|
||||
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:备注
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "备注", IsNullable = true, Length = 500)]
|
||||
public string Remark { get; set; }
|
||||
}
|
||||
|
@ -0,0 +1,130 @@
|
||||
using DS.Module.Core;
|
||||
using DS.Module.Core.Data;
|
||||
using SqlSugar;
|
||||
|
||||
namespace DS.WMS.ContainerManagement.Info.Entity;
|
||||
|
||||
/// <summary>
|
||||
/// 箱管_单程业务
|
||||
/// </summary>
|
||||
[SqlSugar.SugarTable("CM_RentOneWay", "箱管_单程业务")]
|
||||
public class CM_RentOneWay : BaseOrgModel<long>
|
||||
{
|
||||
/// <summary>
|
||||
/// Desc:租箱业务号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "租箱业务号", IsNullable = false, Length = 20)]
|
||||
public string Billno { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:租箱业务 租入 租入退租 租出 CMRentDirectEnum
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "租箱业务", IsNullable = false, Length = 20)]
|
||||
public string RentDirect { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:租箱类型 1长租 0短租 2单程 CMRentTypeEnum
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "租箱类型", IsNullable = true, Length = 20, DefaultValue = "2")]
|
||||
public string RentType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:业务状态
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "业务状态", IsNullable = true, Length = 20)]
|
||||
public string BillState { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:原箱主Id
|
||||
/// </summary>
|
||||
[SqlSugar.SugarColumn(ColumnDescription = "原箱主Id", IsNullable = false, DefaultValue = "0")]
|
||||
public long OldContainerOwnerId { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:原箱主
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "原箱主", IsNullable = true, Length = 50)]
|
||||
public string OldContainerOwner { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:租箱客户Id
|
||||
/// </summary>
|
||||
[SqlSugar.SugarColumn(ColumnDescription = "租箱客户Id", IsNullable = false, DefaultValue = "0")]
|
||||
public long RentCustomerId { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:租箱客户
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "租箱客户", IsNullable = true, Length = 50)]
|
||||
public string RentCustomerName { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:业务日期
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "业务日期", IsNullable = true)]
|
||||
public DateTime? Bsdate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:会计期间
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "会计期间", IsNullable = true, Length = 7)]
|
||||
public string Accdate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:是否业务锁定
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否业务锁定", IsNullable = false, DefaultValue = "0")]
|
||||
public bool? IsBusinessLocking { get; set; } = false;
|
||||
/// <summary>
|
||||
/// Desc:是否费用锁定
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "是否费用锁定", IsNullable = false, DefaultValue = "0")]
|
||||
public bool? IsFeeLocking { get; set; } = false;
|
||||
|
||||
/// <summary>
|
||||
/// Desc:提箱港口代码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "提箱港口代码", IsNullable = true, Length = 20)]
|
||||
public string PickupPortid { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:提箱港口
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "提箱港口", IsNullable = true, Length = 100)]
|
||||
public string PickupPort { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:还箱港口代码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "还箱港口代码", IsNullable = true, Length = 20)]
|
||||
public string DropoffPortid { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:还箱港口
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "还箱港口", IsNullable = true, Length = 100)]
|
||||
public string DropoffPort { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:ETD
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "ETD", IsNullable = true)]
|
||||
public DateTime? ETD { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:ETD
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "ETA", IsNullable = true)]
|
||||
public DateTime? ETA { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:当前业务编号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "当前业务编号", IsNullable = true, Length = 50)]
|
||||
public string Mblno { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:备注
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "备注", IsNullable = true, Length = 500)]
|
||||
public string Remark { get; set; }
|
||||
}
|
||||
|
@ -0,0 +1,175 @@
|
||||
using DS.Module.Core;
|
||||
using DS.Module.Core.Data;
|
||||
using SqlSugar;
|
||||
|
||||
namespace DS.WMS.ContainerManagement.Info.Entity;
|
||||
|
||||
/// <summary>
|
||||
/// 箱管_租箱租入明细
|
||||
/// </summary>
|
||||
[SqlSugar.SugarTable("CM_RentOneWay_Detail", "箱管_租箱租入明细")]
|
||||
public class CM_RentOneWay_Detail : BaseOrgModel<long>
|
||||
{
|
||||
/// <summary>
|
||||
/// 租箱业务id
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "租箱业务id", IsNullable = false)]
|
||||
public long Pid { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:租箱业务号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "租箱业务号", IsNullable = false, Length = 20)]
|
||||
public string Billno { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:箱号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "箱号", IsNullable = false, Length = 20)]
|
||||
public string Cntrno { get; set; }
|
||||
/// <summary>
|
||||
/// 箱型代码
|
||||
/// </summary>
|
||||
[SqlSugar.SugarColumn(ColumnDescription = "箱型代码", Length = 10, IsNullable = true)]
|
||||
public string CtnCode { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:箱型
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "箱型", IsNullable = false, Length = 20)]
|
||||
public string Ctnall { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:原箱主Id
|
||||
/// </summary>
|
||||
[SqlSugar.SugarColumn(ColumnDescription = "原箱主Id", IsNullable = false, DefaultValue = "0")]
|
||||
public long OldContainerOwnerId { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:原箱主
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "原箱主", IsNullable = true, Length = 50)]
|
||||
public string OldContainerOwner { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:租箱客户Id
|
||||
/// </summary>
|
||||
[SqlSugar.SugarColumn(ColumnDescription = "租箱客户Id", IsNullable = false, DefaultValue = "0")]
|
||||
public long RentCustomerId { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:租箱客户
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "租箱客户", IsNullable = true, Length = 50)]
|
||||
public string RentCustomerName { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:租箱业务 租入0/租入退租1
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "租箱业务", IsNullable = true, Length = 20)]
|
||||
public string CMRentDirectEnum { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:租箱类型 长租1 短租0 单程2
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "租箱类型", IsNullable = true, Length = 20)]
|
||||
public string RentType { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:业务状态
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "业务状态", IsNullable = true, Length = 20)]
|
||||
public string BillState { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:关联放箱单号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "关联放箱单号", IsNullable = true, Length = 50)]
|
||||
public string CtnReleaseNo { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:租入日期
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "业务日期", IsNullable = true)]
|
||||
public DateTime? Bsdate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:开始计费日期
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "开始计费日期", IsNullable = true)]
|
||||
public DateTime? FeeStartDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:币别
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "币别", IsNullable = true, Length = 7)]
|
||||
public string Currenty { get; set; } = "USD";
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:日租金
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "日租金", IsNullable = true, Length = 20)]
|
||||
public decimal? Dailyrate { get; set; } = 0M;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:提箱费
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "提箱费", IsNullable = true, Length = 20)]
|
||||
public decimal? PickupFee { get; set; } = 0M;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:提箱日期
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "提箱日期", IsNullable = true)]
|
||||
public DateTime? PickupDate { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:还箱费
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "还箱费", IsNullable = true, Length = 20)]
|
||||
public decimal? DropoffFee { get; set; } = 0M;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:还箱日期
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "还箱日期", IsNullable = true)]
|
||||
public DateTime? DropoffDate { get; set; }
|
||||
|
||||
|
||||
[SugarColumn(ColumnDescription = "提箱港口代码", IsNullable = true, Length = 20)]
|
||||
public string PickupPortid { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:提箱港口
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "提箱港口", IsNullable = true, Length = 100)]
|
||||
public string PickupPort { get; set; }
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Desc:还箱港口代码
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "还箱港口代码", IsNullable = true, Length = 20)]
|
||||
public string DropoffPortid { get; set; }
|
||||
/// <summary>
|
||||
/// Desc:还箱港口
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "还箱港口", IsNullable = true, Length = 100)]
|
||||
public string DropoffPort { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:业务编号/提单号
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "业务编号/提单号", IsNullable = true, Length = 20)]
|
||||
public string Mblno { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Desc:运输工具
|
||||
/// </summary>
|
||||
[SugarColumn(ColumnDescription = "运输工具", IsNullable = true, Length = 100)]
|
||||
public string VehicleName { get; set; }
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<NameOfLastUsedPublishProfile>D:\Source\Repos\DS8\ds-wms-service\DS.WMS.MainApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
|
||||
<NameOfLastUsedPublishProfile>D:\Code\ds8-solution-pro\ds-wms-service\DS.WMS.MainApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
|
||||
</PropertyGroup>
|
||||
</Project>
|
@ -1,7 +1,7 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<NameOfLastUsedPublishProfile>D:\Code\DS\ds8-solution-pro\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
|
||||
<NameOfLastUsedPublishProfile>D:\Code\ds8-solution-pro\ds-wms-service\DS.WMS.OpApi\Properties\PublishProfiles\FolderProfile.pubxml</NameOfLastUsedPublishProfile>
|
||||
<Controller_SelectedScaffolderID>MvcControllerEmptyScaffolder</Controller_SelectedScaffolderID>
|
||||
<Controller_SelectedScaffolderCategoryPath>root/Common/MVC/Controller</Controller_SelectedScaffolderCategoryPath>
|
||||
</PropertyGroup>
|
||||
|
@ -0,0 +1,85 @@
|
||||
using System.Reflection;
|
||||
using DS.Module.Core;
|
||||
using DS.Module.Core.Extensions;
|
||||
using DS.Module.SqlSugar;
|
||||
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 SaasDBUpdateTest
|
||||
{
|
||||
private readonly IServiceProvider _serviceProvider;
|
||||
private readonly SqlSugarScope db;
|
||||
private readonly ISaasDbService saasService;
|
||||
public SaasDBUpdateTest(IServiceProvider serviceProvider)
|
||||
{
|
||||
_serviceProvider = serviceProvider;
|
||||
db = (SqlSugarScope)_serviceProvider.GetRequiredService<ISqlSugarClient>();
|
||||
saasService = _serviceProvider.GetRequiredService<ISaasDbService>();
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// 主库初始化单表
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void MasterInitTableTest()
|
||||
{
|
||||
StaticConfig.CodeFirst_MySqlCollate = "utf8mb4_0900_ai_ci";//较高版本支持
|
||||
db.CodeFirst.InitTables(typeof(SysPrintTemplate));
|
||||
Assert.True(true);
|
||||
}
|
||||
/// <summary>
|
||||
/// 初始化单表 多表
|
||||
/// 注意 海运出口 SeaExport 得手动数据库更新
|
||||
/// </summary>
|
||||
[Fact]
|
||||
public void InitSaasTableTestByCjy()
|
||||
{
|
||||
var tenantList = db.Queryable<DS.Module.SqlSugar.SysTenantLink>().ToList();
|
||||
var ass = Assembly.Load("DS.WMS.Core");
|
||||
//var types = ass.GetTypes().Where(it => it.FullName?.Contains("DS.WMS.Core.TaskPlat.Entity") == true).ToArray();
|
||||
foreach (var item in tenantList)
|
||||
{
|
||||
var tenantDb = saasService.GetBizDbScopeById(item.TenantId).CopyNew();
|
||||
StaticConfig.CodeFirst_MySqlCollate = "utf8mb4_0900_ai_ci"; //较高版本支持
|
||||
//tenantDb.CodeFirst.InitTables(types); //指定表空间下的实体
|
||||
tenantDb.CodeFirst.InitTables(typeof(OpLetterYard));//指定更新特定实体
|
||||
}
|
||||
|
||||
Assert.True(true);
|
||||
}
|
||||
/// <summary>
|
||||
/// 初始化单表
|
||||
/// </summary>
|
||||
[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);
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue