duheng
2024-11-19 ca5f300a7cef85d22b5e0f9d59d117c49f9909b3
Service/HStation.Service.Assets.Core/05-service/00-core/03-helper/DbFirstHelper.cs
@@ -13,7 +13,7 @@
            msg = string.Empty;
            try
            {
                var connectConfig = HStation.Assets.ConfigHelper.PostgreSqlConnectionConfig;
                var connectConfig = HStation.Assets.ConfigHelper.DefaultConnectionConfig;
                if (connectConfig == null)
                {
                    msg = "连接配置初始化失败";
@@ -31,7 +31,7 @@
                        }
                        if (column.DataType == StaticConfig.CodeFirst_BigString)
                        {
                            if (Settings.Assets.XhsParasHelper.Xhs.DataBase.DbType == HStation.Assets.DbType.PostgreSql)
                            if (Settings.AssetsParasHelper.Assets.DataBase.DbType == HStation.Assets.DbType.PostgreSql)
                            {
                                column.DataType = "character varying";
                            }
@@ -41,31 +41,75 @@
                var typeList = new List<Type>()
                {
                   typeof(Entity.PumpGroup),
                   typeof(Entity.PumpGroupAndMainMap),
                   typeof(Entity.PumpMain),
                   typeof(Entity.PumpMainAndPartMap),
                   typeof(Entity.PumpPartMain),
                   typeof(Entity.PumpPropContent),
                   typeof(Entity.PumpSeries),
                   typeof(Entity.PumpType),
                   typeof(Entity.ValveMain),
                   typeof(Entity.ValveSeries),
                   typeof(Entity.ValveGroupAndMainMap),
                   typeof(Entity.ValveGroup),
                   typeof(Entity.AdaptingManage),
                   typeof(Entity.PipeLineRoughnessCoefficient),
                   typeof(Entity.PumpTypeSeriesMap),
                   typeof(Yw.Entity.SysModule),
                   typeof(Yw.Entity.SysType),
                   typeof(Yw.Entity.SysCatalog),
                   typeof(Yw.Entity.SysPropGroup),
                   typeof(Yw.Entity.SysProp),
                   typeof(Yw.Entity.SysPropMapping),
                   typeof(Yw.Entity.SysPropChoice),
                   typeof(Yw.Entity.SysPropValue),
                   typeof(Yw.Entity.SysPropValuePure),
                     };
                   typeof(Entity.AssetsPumpGroup),
                   typeof(Entity.AssetsPumpGroupAndMainMapping),
                   typeof(Entity.AssetsPumpMain),
                   typeof(Entity.AssetsPumpMainAndPartMapping),
                   typeof(Entity.AssetsPumpPartMain),
                   typeof(Entity.AssetsPumpPropContent),
                   typeof(Entity.AssetsPumpSeries),
                   typeof(Entity.AssetsPumpType),
                   typeof(Entity.AssetsPumpSeriesTypeMapping),
                   typeof(Entity.AssetsPumpSeriesManufacturerMapping),
                   //阀门
                   typeof(Entity.AssetsValveMain),
                   typeof(Entity.AssetsValveSeries),
                   typeof(Entity.AssetsValveCoefficient),
                   //弯头
                   typeof(Entity.AssetsElbowMain),
                   typeof(Entity.AssetsElbowSeries),
                   typeof(Entity.AssetsElbowCoefficient),
                   //三通
                   typeof(Entity.AssetsThreelinkMain),
                   typeof(Entity.AssetsThreelinkSeries),
                   typeof(Entity.AssetsThreelinkCoefficient),
                   //四通
                   typeof(Entity.AssetsFourlinkMain),
                   typeof(Entity.AssetsFourlinkSeries),
                   typeof(Entity.AssetsFourlinkCoefficient),
                   //管道
                   typeof(Entity.AssetsPipeMain),
                   typeof(Entity.AssetsPipeSeries),
                   typeof(Entity.AssetsPipeCoefficient),
                   //喷头
                   typeof(Entity.AssetsSprinklerMain),
                   typeof(Entity.AssetsSprinklerSeries),
                   typeof(Entity.AssetsSprinklerCoefficient),
                   //厂商
                   typeof(Entity.AssetsManufacturer),
                   typeof(Entity.AssetsManufacturerSeries),
                   //自定义
                    typeof(Entity.AssetsUserDefined),
                   //空压机
                   typeof(Entity.AssetsExchangerMain),
                   typeof(Entity.AssetsExchangerMainAndPartMapping),
                   typeof(Entity.AssetsExchangerPartMain),
                   typeof(Entity.AssetsExchangerPropContent),
                   typeof(Entity.AssetsExchangerSeries),
                   typeof(Entity.AssetsExchangerCoefficient),
                   //换热器
                   typeof(Entity.AssetsCompressorPartMain),
                   typeof(Entity.AssetsCompressorMain),
                   typeof(Entity.AssetsCompressorMainAndPartMapping),
                   typeof(Entity.AssetsCompressorPropContent),
                   typeof(Entity.AssetsCompressorSeries),
                   typeof(Entity.AssetsCompressorCoefficient),
                   //成套设备
                   typeof(Entity.AssetsPackageMain),
                   typeof(Entity.AssetsPackagePumpMapping),
                   typeof(Entity.AssetsPackageSeries),
                       };
                using (var db = new SqlSugarClient(connectConfig))
                {